Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialricky ebanks
1,212 PointsMy solution to SecondsAlive?
const MyAge = 44;
const YearstoWeeks = 52;
const DaystoWeeks = 7;
const DaystoHours = 24;
const HourstoMinutes = 60;
const MinutestoSeconds = 60;
const SecondsAlive = MyAge * YearstoWeeks * DaystoWeeks * DaystoHours * HourstoMinutes * MinutestoSeconds;
console.log (`Ive been alive for ${SecondsAlive} seconds of my life.`);
My answer: Ive been alive for 1383782400 seconds of my life.
3 Answers
Steven Parker
231,248 PointsI'll bet you totally forgot to celebrate your 1-billionth birth-second.
ricky ebanks
1,212 PointsI totally missed that thank you Steven Parker
Shamique Etienne
Courses Plus Student 1,832 Pointsgood job!
ricky ebanks
1,212 PointsThank you very much!
ricky ebanks
1,212 Pointsricky ebanks
1,212 Pointslol sure did :) so how do you think i did on this challenge? Thanks again.
Steven Parker
231,248 PointsSteven Parker
231,248 PointsYour solution is fine functionally.
But for consistency, the name of the variable "DaystoWeeks" should probably be "WeekstoDays" instead.