Advertisement
728x90
You can use new Date().getTime() to get the current timestamp. There is an alternative shortcut to get the value.
javascript
1console.log(+new Date());
2
3console.log(Date.now());Advertisement
Responsive Ad
🎯 Practice NowRelated Challenge
JavaScript Coding Exercise 36
Test your knowledge with this interactive coding challenge.
Start CodingAdvertisement
728x90
378of476