JavaScript JavaScript Numbers Working with Numbers Create a Program with Math

Alistair Lamberth
Alistair Lamberth
1,874 Points

Turns out I am at least 2505600 seconds old. Sound right to you guys?

This is how I did it... I am 29 years old. What do you guys reckon?

const secsPerMin = 60; const minsPerHour = 60; const hoursPerDay = 24; const daysPerWeek = 7; const weeksPerYear = 52;

const secondsPerDay = secsPerMin * minsPerHour * hoursPerDay; console.log(There are ${secondsPerDay} seconds in a day.);

const yearsAlive = 29 *secsPerMin * minsPerHour * hoursPerDay;

console.log(I have been alive for more than ${yearsAlive} seconds);