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

Js file doesn't show up. Can someone please help me spot the error?

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Musical Playlist</title>
  <link rel="stylesheet" href="css/styles.css">
</head>
<body>
<h1>My Music Playlist</h1>
<div id="listDiv">

</div>
<script src="js/helpers.js"></script>
<script src="js/playlist.js"></script>
 </body>
</html>
var playList = [];
playList.push('I did it my way');
playList.push('Respect','Imagine');
playList.push('Johana');
playList.unshift ('Born to run');

printList( playList ); 

What do you mean by doesn't show up? The play list isn't displayed on the page?

Yes. List is not displayed.

If you are using a workspace can you post a snapshot? Click the camera icon in the upper right corner, then 'Take Snapshot', then post the link created here.

1 Answer

Steven Parker
Steven Parker
231,248 Points

The "printList" function is not defined in the code shown here. Is there more code you did not show?
As Kris suggested, the best way to show everything is to make a snapshot of your workspace and post the link to it here.