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 trialSaif Khan
4,866 PointsFor anyone wanting to take it a little further, I wrote a program to find seconds alive for anyone working the program.
I took it one step further by writing the program to work for anyone wanting to know the secondsAlive for their age.
I created an additional variable called daysPerYear. Also created a variable called yearsAlive with a prompt stored in it asking the user, "How many years have you been alive?" Then I created the final variable secondsAlive with the formula in it.
Then I did document.write with the sentence, "You've been alive for " + secondsAlive + " seconds!"
Dave you are an amazing teacher!!! I'm glad I updated the Treehouse Track so I can learn the basics from you.
Raymond LeDuc
2,499 PointsHey Saif, I had done the same as you. You know what they say, "Great minds think alike."
Dave McFarland
Treehouse TeacherDave McFarland
Treehouse TeacherAwesome Saif Khan! Great job on going further with this program!!!