FrontendDeveloper.in

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());
Back to all JavaScript questions
Get LinkedIn Premium at Rs 399