Subscribe to our mailing list

* indicates required
Close

Monday, September 29, 2008

A number that's not equal to itself

All this time, I've been thinking NaN is not a number. What an idiot I've been.

In JavaScript:

   typeof NaN == 'number'   // true

And yet of course, NaN == NaN is false.

There you go. Amaze your friends.

No comments:

Post a Comment

Add a comment. Registration required because trolls.