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 JavaScript Loops, Arrays and Objects Tracking Data Using Objects Accessing Object Properties

Nathan Minarik
Nathan Minarik
7,358 Points

Some slight differences in the object.js workspace. The print function works, but takes two parameters.

You can simple add 'objectDiv' as the second parameter, or remove the second parameter altogether and just pass objectDiv through the getElementById method. Also, you don't need to put the <p> tags in the message variable, alternatively, you could remove the <p> tags from the print function to simply be div.innerHTML += html;

2 Answers

Dave McFarland
STAFF
Dave McFarland
Treehouse Teacher

Hi Nathan Minarik

Thanks for pointing out this error. I've updated the workspace to match the video.

Nathan Minarik
Nathan Minarik
7,358 Points

No worries. I've been enjoying the classes; keep up the good work.

I also like trying to figure out errors in the code. It helps me better understand what I'm doing. A debugging class like that would be cool, I think.