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 The Build an Object Challenge, Part 2 Solution

JavaScript Object- The build an Object Challenge part 2

The print function for displaying the final result of student records on the web page doesn't show at all!

Could you add your code so that we can see what the problem is? Thanks!

Steven Parker
Steven Parker
229,787 Points

Even better, make a snapshot of your workspace and post the link to it here.

3 Answers

https://w.trhou.se/xxx02vzbu2 pls here is the link to the snapshot of workplace with the coded program

Steven Parker
Steven Parker
229,787 Points

It worked for me.

When I opened the preview on your workspace snapshot, I saw a title and five student names.

Perhaps your browser isn't connecting to the preview site? This might be an issue to take up with the Support folks.

Alright tnx!

Andrew Thompson
Andrew Thompson
28,063 Points

Hi Nicolas,

from what i could see is you had the variable commented out. and not using the innerHTML property on the ouputDiv variable.

function print(message) {
  var outputDiv = document.getElementById('output');
  outputDiv.innerHTML = message;
}

This is how a think yours should look.

Hope this helps.