Comment

Comment by maximusprime

"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.

parent maximusprime 15 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton