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 Student Record Search Challenge Solution

Colin Sandlin
Colin Sandlin
4,512 Points

How common is it in the real world to print to the page?

I tend to understand everything about the program until it gets to:

message = getStudentReport(student);
    print(message);

I understand the premise of what it's doing, but I can never get this part right. How important is it to know moving forward?

1 Answer

Steven Parker
Steven Parker
231,268 Points

The "print" function used here is essentially just a shorthand for filling in the contents of a "div" element on the page. This is actually a useful and reasonably common practice.

What issue are you having with it? Perhaps if you show your entire code someone can help you with it. If possible, make a snapshot of your workspace and post the link to it here.