JavaScript Date valueOf() methodThe JavaScript date valueOf() method returns the primitive value of a Date object. SyntaxThe valueOf() method is represented by the following syntax: ReturnA primitive value of a Date object. JavaScript Date valueOf() method exampleHere, we will understand valueOf() method through various examples. Example 1Let's see an example to fetch primitive value of a Date object. Test it NowOutput: 1533815687148 Example 2Let's see an example to fetch primitive value of the specified Date object. Test it NowOutput: -706266470000 Example 3Let's see one more example to fetch the primitive value of the specified Date object. Test it NowOutput: 1534344730000 Next TopicJavaScript Date |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India