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

JavaScript

Matt Rougeux
Matt Rougeux
1,625 Points

Am I doing something wrong?

For whatever reason when I try and preview the code I have written, nothing happens. I have looked over it all a million times and neither the alert() or document.write function seems to do anything. Here's the link: https://w.trhou.se/kf5dc14aij

2 Answers

Do you use the developer tools? If you check the console you'll see there is an error on line 7 of your JavaScript.

document.write('There are ' + secondsPerDay ' seconds in a day.');

There should be a + after secondsPerDay

Matt Rougeux
Matt Rougeux
1,625 Points

...smh you're right. Hang with me, I'll learn!