The valueOf() method is used to return the primitive value of a Date object.
Note: The primitive value is returned as the number of millisecond since midnight January 1, 1970.
This method has the form:
The following example shows the basic use of this method.
<script> var d = new Date(); document.write(d.valueOf()); </script>
This produces the following result: