Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
undecidabot
on April 5, 2018
|
parent
|
context
|
favorite
| on:
The secret life of NaN
A little "fun" fact about NaN: they are never equal to each other, even if it's the exact same value and variable.
How can you check if a variable is NaN then? Well, if it's not equal to itself then it must be NaN!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
How can you check if a variable is NaN then? Well, if it's not equal to itself then it must be NaN!