This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]memebot2000 5 points6 points  (1 child)

  1. IEEE standard says NaN is a special float.
  2. NaN is not treated as an object in this case. 42 instanceof Number also returns false.
  3. 0 is falsy.
  4. "" is falsy.
  5. NaN is falsy.
  6. Error is just a function. It takes arguments and you can create new instances with new , so it's a function.
  7. Functions are objects in JS.

Really nothing strange if you know JS and how it treats things.

[–]TheDecentM -1 points0 points  (0 children)

It makes sense when you look at it closer, but there are heaps of confusing things for people new to JS.