Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
robocat
on May 15, 2015
|
parent
|
context
|
favorite
| on:
JavaScript at 20
Ironically enough, 1/0 is Infinity, which is a valid number, instead you need to use 0/0 to get NaN. Even worse, the rules for NaN aren't specific to JavaScript, but come from the IEEE 754 floating point standard.
Standard NaN is even weirder:
http://en.m.wikipedia.org/wiki/NaN
Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
Standard NaN is even weirder: http://en.m.wikipedia.org/wiki/NaN