Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
kuschku
9y ago
0 comments
Save
Share
NaN === NaN evaluates to false. That’s what happens here, not anything with Infinity.
0 comments
5 comments · 2 top-level
top
newest
oldest
caub
9y ago
· 2 in thread
just type them in your console instead of saying wrong things
kuschku
OP
9y ago
Then they don’t conform to the IEEE standards, and the Javascript implementers are wrong.
caub
9y ago
NaN !== NaN is just right
1 more reply
Arkanum
9y ago
· 1 in thread
Yeah, that makes sense mostly. But why is NaN === NaN false? What am I missing here?
kuschku
OP
9y ago
Because there is many ways NaN can be generated, all very different.
== is only defined for numbers, too.
1/0 and 50/0 aren’t the same, for example.
j
/
k
navigate · click thread line to collapse