/* SoloLearn.com - JavaScript Challenge * by brains */ var x = NaN; var y = x; if (x === y) console.log(true); else console.log(false); //----------------------------- console.log(x, typeof x, y, typeof y, x === y); a = 0; b = a; console.log(a, typeof a, b, typeof b, a === b); a = Infinity; b = a; console.log(a, typeof a, b, typeof b, a === b);
false NaN 'number' NaN 'number' false 0 'number' 0 'number' true Infinity 'number' Infinity 'number' true