Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
walrus
on July 6, 2011
|
parent
|
context
|
favorite
| on:
Advanced Javascript tips and tricks
"1259359833574" isn't a magic constant. JavaScript uses // for comments. The number is just an example of the possible output of the expression "+new Date()" (specifically, it was the time at which the author of that page evaluated the expression).
altano
on July 6, 2011
[–]
Right, and it's equivalent to the more readable
Number(new Date())
or more simply
Date.now()
if you don't need IE8 support.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: