← BYTES
JavaScript·Starter·Ref: 3.1.5
What does the expression `NaN === NaN` evaluate to?
Have a question about this video? Mention reference 3.1.5 when you contact us.
a.true
b.undefined
c.NaN
d.false
By the IEEE 754 floating-point spec (which JS numbers follow), NaN is defined to never equal anything, including itself -- so NaN === NaN is false. Use Number.isNaN(x) or Object.is(x, NaN) to actually test for NaN.
Find this on YouTube & Instagram
Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:
#BYTES#BYTES315#JavaScript