CodesJava

Easy learning with example program codes

JavaScript valueOf() method

The JavaScript date valueOf() method is used to get the primitive value of a Date object.

Syntax:

dateObj.valueOf();

Return:
Primitive value of a Date object.

Example:

<!DOCTYPE html>
<html>
<body>
<script>  
var bday=new Date("November 16, 1994 21:10:10");  
document.writeln(bday.valueOf());  
</script>  
</body>
</html>

Output:

785000410000
Please follow and like us:
error








Copyright © 2019 CodesJava DMCA.com Protection Status