How to get the current date in milliseconds with JavaScript

1 Answer

0 votes
const date =  Date.now();

console.log(date);
console.log(new Date(Date.now()));




/*
run:
   
1584957619801
2020-03-23T10:00:19.804Z

*/

 



answered Mar 23, 2020 by avibootz
...