I've always wanted to know the difference between the two popular ways to get current timestamp in JS.
Date.now()
new Date().getTime()
What is the difference between the two? And if they are the same, why do we have two things that do the same job?