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 trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Tural Rzazade](https://uploads.teamtreehouse.com/production/profile-photos/11591276/micro_Tural_Rzazade.jpg)
Tural Rzazade
3,750 PointsMyCode
const secsPerMin = 60;
const minsPerHour = 60;
const hoursPerDay = 24;
//const daysPerWeek = 7;
//const weeksPerYear = 52;
//
//secondsPerDay = secsPerMin * minsPerHour * hoursPerDay;
//
//console.log(`There are ${secondsPerDay} seconds in a day.`)
const yearsAlive = 24;
const daysPerYear = 365;
const secsAlive = secsPerMin * minsPerHour * hoursPerDay * daysPerYear;
console.log(`I've been alive for more than ${secsAlive} seconds!`);
5 Answers
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsI'm guessing there's no question or error here, but this is just a response to the instructor's suggestion in the video of "when you're done, why don't you share your solution with other Treehouse students?"
![josephweiss2](https://uploads.teamtreehouse.com/production/profile-photos/11652095/micro_configuration.jpg)
josephweiss2
7,094 PointsNicely done!!! Go further with your excellent coding!!
![Tural Rzazade](https://uploads.teamtreehouse.com/production/profile-photos/11591276/micro_Tural_Rzazade.jpg)
Tural Rzazade
3,750 PointsThank you guys! :) Everything is fine! I know it seems a little strange to post your code by using "Get help" button, but as you guessed I did it according to Guil's suggestion. 👻
![Luz Bautista](https://secure.gravatar.com/avatar/f87d0a0c987db25af440e2837ab0e5b6?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Luz Bautista
UX Design Techdegree Graduate 21,744 PointsHere is my solution, I left the previous code in place so I could use the secondsPerDay variable and shorten the math a bit.
const secPerMin = 60;
const minsPerHour = 60;
const hoursPerDay = 24;
const daysPerWeek = 7;
const weeksPerYear = 52;
const secondsPerDay = secPerMin * minsPerHour * hoursPerDay;
console.log(`There are ${secondsPerDay} seconds in a day.`);
const yearsAlive = 44;
const daysPerYear = 365;
const secondsAlive = secondsPerDay * daysPerYear * yearsAlive;
console.log(`I've been alive for more than ${secondsAlive} seconds!`) ```
![josephweiss2](https://uploads.teamtreehouse.com/production/profile-photos/11652095/micro_configuration.jpg)
josephweiss2
7,094 PointsNice Work!!
jessicakincaid
21,824 Pointsjessicakincaid
21,824 PointsDo you have a question? Are you receiving an error?