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 Multiple Items with Arrays Adding Data to Arrays

Cory Wallace
Cory Wallace
14,106 Points

printList @ 06:27 does exactly Nothing.

I'm attempting to follow these steps, I have the ame code listed as the example, only I'm getting the following error message when trying to run the code example:

"playlist.js:4 Uncaught ReferenceError: printList is not defined at playlist.js:4"

Dave affirms that printList is a working javascript operator (I may be wrong on that verbiage, regardless, he indicates that this "Should work")

I've checked the Javascript MDN and scrubbed google, nothing comes back on "printList" in JavaScript.

Can someone please direct me to the documentation on this?

1 Answer

Steven Parker
Steven Parker
229,788 Points

The "printList" function is not a JavaScript built-in. At about 6:15 in the video Dave explains that it is defined in the "helpers.js" file. It was briefly shown earlier at about 4:35 in the video, and 10 seconds later you can see the HTML code added to include that file in the project.

If you haven't added it in your own code, that would explain the error message you are seeing.

If that's not it, try making a snapshot (note: not "screenshot") of your workspace and post the link to it here to facilitate a full analysis.

Cory Wallace
Cory Wallace
14,106 Points

you're correct. I somehow missed that in the video.

Thank you!