Why should you not use Number as a constructor? [duplicate]
In addition to breaking === and typeof returning “object”, using the Number constructor also changes the way the value is used in boolean contexts. Since “new Number(0)” is an object, not a literal value, it evaluates as “true” because it is not null. So for example: var n1 = 0; var n2 = new Number(0); … Read more