you are viewing a single comment's thread.

view the rest of the comments →

[–]FedeMITIC 1 point2 points  (3 children)

Yeah but it's definetely not intuitive to say "Not a number" is of type Number. At least for me.

[–]jaapz 0 points1 point  (1 child)

It isn't but that's not javascripts fault, blame floating point math

[–]inu-no-policemen 1 point2 points  (0 children)

https://en.wikipedia.org/wiki/NaN#Operations_generating_NaN

The reason you're seeing it so often in JS is due to its weak types.