node.js What does Date#getTime() do?

ajHurliman picture ajHurliman · Oct 21, 2014 · Viewed 7.9k times · Source

I'm working on learnyounode module 13 right now. In the hints section it claims "Date#getTime() will also come in handy."

I looked up the Date object and found the getTime method, but what does it mean when there's a hash instead of a period?

Answer

Glen Swift picture Glen Swift · Oct 21, 2014

This is just a refference to getTime method of Date object. It is normal syntax when you talk about documentations.

According to EcmaScript specification it returns this time value (the number of milliseconds since 1 January 1970 00:00:00 UTC.).