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 trialLeyton Parker
6,556 PointsObjects not printing to the page?
My code is exactly the same as the video (besides the property values which doesn't matter anyway) but I can't get the objects to print to the page. The JS console doesn't show any errors.
Please help :)
1 Answer
Cory Madden
7,120 PointsHey, Leyton. I went ahead and tried out your code and it seems to work as intended in my workspace. Does your workspace look like this one https://teamtreehouse.com/workspaces/10016432 ?
Leyton Parker
6,556 PointsI can't view the link, I think it's linked to your account only.
Cory Madden
7,120 PointsSorry about that, didn't know that. You should be able to view this one https://w.trhou.se/ha39z0w6be
Leyton Parker
6,556 PointsHey, so I went to the next video in the course and previewed the page using all of the code provided by the new workspace and still the site was blank. I think I'm having problems on my end ...
Leyton Parker
6,556 PointsHey Cory,
So I think I have something weird with my workspaces where when I declared i as a variable it worked
for (var i = 0; i ...
Cory Madden
7,120 PointsI didn't catch that. It worked because it just created a global variable named i that it worked with. You shouldn't do that, and should declare it with "var".
Leyton Parker
6,556 Pointswell, somehow that fixed the problem, and it printed to the page.
Leyton Parker
6,556 PointsLeyton Parker
6,556 Pointsstudents.js
student_report.js
index.html