NaN, the not-a-number number that isn't NaN
Briefly

NaN, the not-a-number number that isn't NaN
"That means once any part of a calculation includes or results in NaN, the whole thing will result in NaN. As soon as NaN is in play, we can't possibly end up with a number: Likewise, any comparison that uses NaN as one of the operands will evaluate to false, which certainly tracks in the same way - no value can be greater than, less than, or equal to what is effectively a placeholder for the concept of being a non-number result:"
"It follows that any individual value will be unequal to NaN, as those values either are numbers - thus not NaN - or aren't evaluated as numbers, and thus not NaN. Now, here's where it gets weird: that inequality extends to NaN itself. The way true represents the very essence of trueness, NaN represents a non-specific non-number result. NaN is the only value in the whole of JavaScript that isn't equal to itself."
NaN propagates through arithmetic: any calculation including NaN produces NaN, preventing numeric results. Comparisons using NaN always evaluate to false, so no value compares as greater, less, or equal to NaN. Every individual value is unequal to NaN because values are either numeric or non-numeric and thus not NaN. Uniquely, NaN is not equal to itself; NaN !== NaN. Across computing, NaN represents a breakdown or error state in floating-point arithmetic. IEEE 754 specifies that operations propagating a NaN should produce a NaN, preserving payloads when representable in the destination format.
Read at Piccalilli
Unable to calculate read time
[
|
]