- Falsy and being strictly equal to
false
are very different things, that's why one has a y
instead of an e
. ;)
NaN
is spec'd to never be equal to anything. The second part of your question is comparing false === 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
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…