Y
Hacker News
new
|
ask
|
show
|
jobs
by
maximusprime
5287 days ago
"hello" - 1 doesn't return NaN out of some sense of exception to trying to subtract from a string.
It returns it because parseFloat("hello") = NaN, and NaN - 1 = NaN.