is nan in js code example
Example 1: nan javascript
// NaN: Not a Number in javascript
console.log(parseInt('1.23')); // 1.23
console.log(parseInt('something')); // NaN
Example 2: javascript check if is nan
function isNaN(x) {
return x !== x;
};
isNaN(NaN);//true