Get the current timestamp

There are a few ways to get the current timestamp. All method return the number of milliseconds:
new Date().getTime();;
// These method are the same
// The unary operator (`+`) calls the `valueOf` method automatically
+new Date();
new Date().valueOf();
Take a look at this snippet if you want to get the current time in seconds