Skip to content

Instantly share code, notes, and snippets.

@frytg
Last active January 31, 2019 07:40
Show Gist options
  • Save frytg/1569998cf58dcaba8b6f5d6490d17048 to your computer and use it in GitHub Desktop.
Save frytg/1569998cf58dcaba8b6f5d6490d17048 to your computer and use it in GitHub Desktop.

JS things

Get timestamp in secs

Math.floor(Date.now() / 1000)

or

moment().unix()

Looping

Loop with key:

for (key in array)

Loop with object:

for (object of array)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment