Number.prototype.valueOf() Method in Number Class of Javascript Syntax with Examples
2327 Views
Usage
The valueOf() method is used to return the primitive value of a number object
Syntax
numberObject.valueOf()
Example
var x = new Number(3);
document.write(x.valueOf());
var x = new Number(3.777);
document.write(x.valueOf());
var x = new Number(38.777);
document.write(x.valueOf());