JavaScript Objects The Number Object- valueOf() - Javascript Objects

What is JavaScript Number - valueOf()?

valueOf() method returns the primitive value of the specified number object.

Syntax:

The syntax is as follows −

Return Value:

Returns the primitive value of the specified number object.

Example:

Try the following example

Output:

num.valueOf() is 15.11234


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Javascript Objects Topics