JavaScript: Number.isNaN

By Xah Lee. Date: . Last updated: .
Number.isNaN(number)
If number is NaN, return true, else false. [see NaN]
console.log(Number.isNaN(NaN));

console.log(Number.isNaN("NaN") === false);
console.log(Number.isNaN("3") === false);
console.log(Number.isNaN(3) === false);
console.log(Number.isNaN(Infinity) === false);

JavaScript Special Literals

BUY
ΣJS
JavaScript in Depth

JS Obj Reference

Number

prototype