What is the difference between “new Number(…)” and “Number(…)” in JavaScript?
In Javascript, one of the reliable ways to convert a string to a number is the Number constructor: var x = Number(’09’); // 9, because it defaults to decimal Inspired by this question, I started wondering — what is the difference between the above and: var x =new Number(’09’); Number certainly looks better, but it … Read more