UNIX milliseconds timestamp in JavaScript

var timestamp = +(new Date()); console.log(timestamp);

1 Response

As the division and multiplication part became kinda odd, a good (and smaller) approach would be using: timestamp = +(new Date()); instead.

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.