var timestamp = new Date().getTime();
var currentTimeInSeconds=Math.floor(Date.now()/1000); //unix timestamp in seconds
var currentTimeInMilliseconds=Date.now(); // unix timestamp in milliseconds
var tempsEnMs = Date.now();
Short & Snazzy:
+ new Date()
A unary operator like plus triggers the valueOf method in the Date object and it returns the timestamp (without any alteration).