4 ms·
Indeed. That's because ECMAScript standard states that Numbers should be IEEE-754 floating point data, which includes positive and negative infinity, and also
by krisk 14y ago
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 :)
- krisk 14y agoI've written another post which explores NaN in detail: "NaN and typeof" - http://kiro.me/blog/typeof_nan.html http://kiro.me/blog/typeof_nan.html