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 trialChristopher Mayhone
433 PointsDocument write is not writing anything. What wrong?
Document.write is not showing anything when I preview it. This is my code
var secondsPerMin = 60;
var minsPerHour = 60;
var HoursPerDay = 24;
var daysPerWeek = 7;
var weeksPerYear = 52;
var secondsPerDay = secondsPerMin * minsPerHour * hoursPerDay;
document.write(βthere are β + secondsPerDay + β seconds in a day');
Does it look wrong?
2 Answers
Stuart Wright
41,120 PointsIt looks like you might have used backticks (`) for some of your quotation marks - make sure you use the correct character to denote strings (' or ").
You also need to be careful with the case of your variable names (hoursPerDay and HoursPerDay are not the same in JavaScript).
Amber Cyr
19,699 PointsYour HoursPerDay in secondsPerDay needs to be capitalized.
var secondsPerDay = secondsPerMin * minsPerHour * HoursPerDay;
Christopher Mayhone
433 PointsChristopher Mayhone
433 PointsThanks that helped!