JavaScript Reference/Javascript Methods/valueOf
"valueOf()" Example
<html>
<body>
<button onclick="var myDate = new Date(); alert(myDate.valueOf());">
value of my date
</button>
</body>
</html>
"valueOf()" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |Array Date |
| |Number Object |
| |String |
+----------------+--------------------------------------------------------------+
"valueOf()" Syntax Parameters and Note
Note:
Converts the object to a string.
Syntax:
objectName.valueOf()