how many days old am i

Solutions on MaxInterview for how many days old am i by the best coders in the world

showing results for - "how many days old am i"
Nikita
03 Oct 2020
1let date = [2000, 1, 1]
2// date[0] = year
3// date[1] = month
4// date[2] = date
5console.log((new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()) - new Date(date[0], date[1] - 1, date[2])) / 1000 / 60 / 60 / 24)