Skip to content

Latest commit

 

History

History
16 lines (9 loc) · 471 Bytes

what_is_the_shortcut_to_get_timestamp.md

File metadata and controls

16 lines (9 loc) · 471 Bytes

What is the shortcut to get timestamp?

In JavaScript, you can get the current timestamp (in milliseconds) using the Date.now() method or new Date().getTime().

Example:

let timestamp = Date.now();
console.log(timestamp);  // Output: current timestamp in milliseconds

Tags: basic, JavaScript, Date