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 trialEnemuo Felix
1,895 PointsPlease, why can't I run this code
Here is the link to the snapshot https://w.trhou.se/q6t7nrfpcn
1 Answer
Katie Wood
19,141 PointsHi there,
Just a couple things keeping this from running:
- In your index.html, it's currently just looking for 'helpers.js', but the file is actually in the js folder. That means you need to add the folder to the address, like this:
<script src = "js/helpers.js"></script>
- In helpers.js, there is a comma on line 7, after the playList variable. To fix this, just clear that line.
After I did these two things, it loaded with your list of songs - good luck!
Enemuo Felix
1,895 PointsEnemuo Felix
1,895 PointsBless you Katie! Thank you for the rescue again. Just to be clear, I'll like to know why the playlist are numbered. Is it because the items in the array is written out in separate lines like this?
Katie Wood
19,141 PointsKatie Wood
19,141 PointsGood question!
It's numbered because of the printList() function. If you check out how it writes the html, it uses the <ol> tag - that's an ordered list. That means that the list defaults to numbered values.
Enemuo Felix
1,895 PointsEnemuo Felix
1,895 PointsWonderful! Thank you so much. I need to pay a lengthy visit to css an Html since I started with JS, but I don't know the best time to do that. I'v always wondered if this JS course will ever end