mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-02-01 21:04:00 -05:00
313 B
313 B
title
| title |
|---|
| Get Timestamp |
You can use Date.now() to get the current timestamp in milliseconds.
You can easily convert the timestamp to seconds like this: Math.floor(Date.now() / 1000)
If your browser does not support Date.now(), you can use new Date().getTime() to get the timestamp in milliseconds.