Skip to main content
InterviewHubPRO
Section Overview
Q382

Question 382 of 536

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

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

What is the shortcut to get timestamp

senior LevelCode ExampleAsync & PromisesEvent LoopHTTP & REST APIs

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());