0

Date object

Please explain this topic and syntax of date object. How does 86400000 represent Fri Jan 02 1970 00:00:00? Link to my code: https://code.sololearn.com/WVUqLvSZpQg2/?ref=app Thanks in advance

26th Mar 2020, 2:56 PM
O.Naga Lakshmi Lalasa
O.Naga Lakshmi Lalasa - avatar
3 Answers
+ 2
I see that you have updated your question to be specific, so I am posting a second answer. the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC can be got with Date.now(). https://code.sololearn.com/WY59c9VobaoJ/?ref=app https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now If you pass a long number into Date constructor, it is treated as the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC.
26th Mar 2020, 3:49 PM
Gordon
Gordon - avatar
0
Thank you so much
26th Mar 2020, 4:34 PM
O.Naga Lakshmi Lalasa
O.Naga Lakshmi Lalasa - avatar