News for hackers. Stuff that matters.
Re:Javascript's NaN by grayrest on Monday September 24, 2012 @04:34PM (#4566820)
isNaN will return true for NaN and all values that coerce to it. The equals check will test ONLY for NaN itself:

var x = "a";

isNaN(x); // true

(x === x) === false // false

x = NaN

isNaN(x); // true

(x === x) === false // true

There are no comments on this comment yet.