r/javascript • • Mar 18 '19

What's your favorite, most useful javascript one-liner?

385 Upvotes

422 comments sorted by

View all comments

3

u/robolab-io Mar 19 '19

Eh not that great but (new Date().getTime()) is my quick way to get Unix time in one line

8

u/GBcrazy Mar 19 '19

You can do this with Date.now()

→ More replies (1)
→ More replies (1)