NaN (Not a Number).
- Why does not
NaN
equal(==
) or strict equal(===
) toNaN
itself? - How we can evaluate the following conditions to true?
let x = NaN;
// equal(==)
if(x == NaN) {
console.log(`${x} (Not a Number)`);
}
// strict equal(===)
if(x === NaN) {
console.log(`${x} (Not a Number)`);
}