ES6 - valueOf() Method


Advertisements


This method returns the primitive value of a Date object as a number data type, the number of milliseconds since midnight 01 January, 1970 UTC.

Syntax

Date.valueOf()

Return Value

Returns the primitive value of a Date object.

Example

var dateobject = new Date(1993, 6, 28, 14, 39, 7); 
console.log( dateobject.valueOf() );           

Output

743850547000            

es6_date.htm

Advertisements
E-Books Store