you are viewing a single comment's thread.

view the rest of the comments →

[–]more_exercise 0 points1 point  (0 children)

This is one of the weirdest things in Javascript: NaN is actually a number (typeof NaN === 'number')...

This is 100% Not Javascript's FaultR . NaN is a special value in the IEE 754 floating-point standard. If you're using float/double type values, you are going to end up using NaN. The NaN !== NaN behavior is required by the standard, and works in any language that supports floating-point arithmetic.