Easy Tutorial
❮ Prop Video Seekable Met Nodelist Item ❯

JavaScript valueOf() Method

JavaScript Date Object

Example

Return the primitive value of a Date object:

n Output result:


Definition and Usage

The valueOf() method returns the primitive value of a Date object.

Note: The primitive value is the number of milliseconds since midnight of January 1, 1970!


Browser Support

valueOf() is supported by all major browsers.


Syntax

Return Value

Type Description
Number The milliseconds representation of the date. The return value is the same as the value returned by Date.getTime, representing the number of milliseconds since midnight of January 1, 1970.

Technical Details

| JavaScript Version: | 1.1 | | --- | --- |


JavaScript Date Object

❮ Prop Video Seekable Met Nodelist Item ❯