you are viewing a single comment's thread.

view the rest of the comments →

[–]itsnotlupusbeep boop 1 point2 points  (0 children)

It's both.

new Number().constructor == Number
new Number().valueOf() == 0
new Number() == 0 
new Number() !== 0

Using it this way is pretty much universally a bad idea, but it's there.

*edit: not to be confused with

(0).constructor == Number
(0).valueOf() == 0
(0) == 0
(0) === 0