NaN is a number

JavaScript, like .NET, has a special thing called NaN, which stands for Not a Number. It is useful to determine if parsing a string successfully returned a number or for some operation results. Well, guess what this evaluates to:

typeof(Number.NaN)

Yes, you guessed it from the title, it evaluates to "number".

Just thought you might find this funny (as I did).

9 Comments

Comments have been disabled for this content.