Name
Number.valueOf() — return the primitive number value
Inherits from
Overrides Object.valueOf()
Synopsis
number
.
valueOf
()
Returns
The primitive number value of this Number object. It is rarely necessary to call this method explicitly.
Throws
- TypeError
If this method is invoked on an object that is not a Number.
See Also
Get JavaScript: The Definitive Guide, 6th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.