Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
mohbk
· 3y ago · 0 comments
and typeof NaN == "number" is also part of the standard, it is valid to pass NaN to functions that accept numbers, and it's expected to propagate or change back to normal numbers (e.g. NaN^0=1)
Comments
[–]
marcosdumay
3y ago
If anything, JS has plenty of problems due to its too literal interpretation of NaN.