Re:JavaScript - "typeof" operator & null
by krisk on Friday June 22, 2012 @12:36AM
(#4145422)
Indeed. That's because ECMAScript standard states that Numbers should be IEEE-754 floating point data, which includes positive and negative infinity, and also NaN. Hence why, in JS, it's part of the Number object: Number.NaN. Technically, it's stil a numeric data type, but just points to an invalid number :)
[ Parent
| on HN ]
I've written another post which explores NaN in detail: "NaN and typeof" - http://kiro.me/blog/typeof_nan.html