How can I get a timestamp in JavaScript?
Something similar to Unix timestamp, that is, a single number that represents the current time and date. Either as a number
In addition to the other options, if you want a dateformat ISO, you get can get it directly
console.log(new Date().toISOString());