ES6 - valueOf()


Advertisements

This method returns the primitive value of the specified number object.

Syntax

number.valueOf()  

Return Value

Returns the primitive value of the specified Number object.

Example

var num = new Number(10); 
console.log(num.valueOf());

Output

10  
es6_number.htm
Advertisements