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
|
JavaTpoint offers too many high quality services. Mail us on [email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected]
Duration: 1 week to 2 week