InterviewHubPRO
Section Overview
Q382

Question 382 of 521

Part 6: Async Internals, Memory, Microtasks & Web APIs (329 - 403)

73%
JavaScript Internals (521 Qs)•Part 6: Async Internals, Memory, Microtasks & Web APIs (329 - 403)

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.

javascript
  console.log(+new Date());
  console.log(Date.now());