10.07.2017 Views

javascript_tutorial

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Javascript<br />

<br />

Output<br />

Wed, 28 Jul 1993 09:09:07 GMT<br />

valeOf ()<br />

This method returns the primitive value of a Date object as a number data type,<br />

the number of milliseconds since midnight 01 January, 1970 UTC.<br />

Syntax<br />

Its syntax is as follows:<br />

Date.valueOf ()<br />

Return Value<br />

Returns the primitive value of a Date object.<br />

Example<br />

Try the following example.<br />

<br />

<br />

JavaScript valueOf Method<br />

<br />

<br />

<br />

var dateobject = new Date(1993, 6, 28, 14, 39, 7);<br />

document.write( dateobject.valueOf() );<br />

<br />

<br />

<br />

271

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!