Just out of curiosity.
It doesn\'t seem very logical that typeof NaN
is number. Just like NaN === NaN
or NaN == NaN
returning
NaN != NaN
because they are not necessary the SAME non-number. Thus it makes a lot of sense...
Also why floats have both +0.00 and -0.00 that are not the same. Rounding may do that they are actually not zero.
As for typeof, that depends on the language. And most languages will say that NaN is a float, double or number depending on how they classify it... I know of no languages that will say this is an unknown type or null.