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

My array items do not show up

https://w.trhou.se/be7tt8101i It's supposed to be a playlist but only the title appears.

andi mitre
andi mitre
Treehouse Guest Teacher

Stanley Wilkins looks good to me as well! two playlists with titles 'I did it!!' and 'not working'.

Cheers

JORGE HERRANDO GARIJO
JORGE HERRANDO GARIJO
7,895 Points

I had the same problem and I fixed it changing the following code in index.html:

<script src="js/helpers.js"></script> <script src="js/playlist.js"></script>

to

<script src="js/helpers.js"></script> <script src="playlist.js"></script>

Not sure if you are inside js folder after calling the first js file.

Any idea?

It works now.

2 Answers

When I previewed it in Workspaces, it rendered the list items. I also copied all the files to Dreamweaver and then looked at it a browser, and the code rendered the list items as well. Not sure how you are previewing it?

That's weird! After your replies I tried running it on Firefox and it worked. However, I can't still see items on my default browser Chrome. I'm using the latest version and no plug ins are installed that would interfere with pages. I'll change to Firefox for quick fix. Thanks.

Edit: I encountered same issue on Firefox in another lesson, so I found another solution for those who experience the same thing. (for Firefox only) Hold down the shift key, and then left-click the reload button. Before that, js file did not load for some unknown reason.

Well, that is weird! Glad you could finally get it to show up, though with some fiddling. I'm running the latest Chrome on the latest mac os. You could check your browser's cache settings. Don't know if you're on a PC, but I've encountered browsers on a PC that refused to refresh things like CSS and JS files due to cacheing issues.