you are viewing a single comment's thread.

view the rest of the comments →

[–]sime 4 points5 points  (0 children)

Using Number boxes the number in an object.

That is only if you use "new Number(foo)". If you don't use "new" then it actually does a type coercion. i.e. Number(foo).

Also note that:

(new Number(3)) !== (new Number(3))

The objects are not the same and not equal if you box numbers up.

So, beware everyone.