- Falsy and being strictly equal to
false
are very different things, that’s why one has ay
instead of ane
. 😉 NaN
is spec’d to never be equal to anything. The second part of your question is comparingfalse === false
, which is funnily enough,true
🙂
If you really want to know if something is NaN
, you can use Object.is()
. Running Object.is(NaN, NaN)
returns true
.