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 1 Solution

Code Critique?

I am doing the build an object challenge part 1.

I wrote: var students= [ {name:"John", track:"ios", achievements: 100, points: 1}, {name:"Jonah",track:"web", achievements:90, points:7}, {name:"Jason",track:"css", achievements:80, points:5}, {name:"Jamie",track:"android", achievements:50, points: 6}, {name:"Juan",track:"HTML", achievements:77, points:2}, ];

My output didn't show anything other than a white page saying "students" in bold. Is this right?

1 Answer

Steven Parker
Steven Parker
229,788 Points

At this point, yes, and the code that displays "Students" is in the code not shown here (the HTML part).

The javaScript so far is just one statement (though a long one) that creates the variable "students" and stores data into it. The code to do things with this data (like display it on the page) will be added later as you progress through the course.

Thank you, I am trying my best to follow, but its hard to capture everything even pausing the video, going from my editor and to Treehouse's editor. I wish Treehouse would just print our console's output.

Steven Parker
Steven Parker
229,788 Points

There is no code here yet that would show anything on the console, either.