JavaScript question detail
What is the shortcut to get timestamp
You can use new Date().getTime() to get the current timestamp. There is an alternative shortcut to get the value.
console.log(+new Date());
console.log(Date.now());
JavaScript question detail
You can use new Date().getTime() to get the current timestamp. There is an alternative shortcut to get the value.
console.log(+new Date());
console.log(Date.now());