This method returns the primitive value of the specified number object.
number.valueOf()
Returns the primitive value of the specified number object.
var num = new Number(10); console.log(num.valueOf());
On compiling, it will generate the same code in JavaScript.
The code will produce the following output −
10