Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.