Return the primitive value of a Date object:
The result of n will be:
The valueOf() method returns the primitive value of a Date object.
Note: The primitive value is returned as the number of millisecond since midnight January 1, 1970 UTC.
Method | |||||
---|---|---|---|---|---|
valueOf() | Yes | Yes | Yes | Yes | Yes |
None |
Return Value: | A Number, representing the number of milliseconds between the date object and midnight January 1, 1970 UTC |
---|---|
JavaScript Version: | 1.1 |