How can I get a timestamp in JavaScript?
Something similar to Unix timestamp, that is, a single number that represents the current time and date. Either as a number
I like this, because it is small:
+new Date
I also like this, because it is just as short and is compatible with modern browsers, and over 500 people voted that it is better:
Date.now()