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 Arrays Loop Through Arrays Loop Through an Array

My playlist threw an error when I added a song

I added a song ('Cool Song') at the end of my playlist and I got the following error: Uncaught SyntaxError: Unexpected string. My code is exactly like the instructor's. What's up?

Steven Parker
Steven Parker
229,744 Points

To make it possible to analyze your issue and give an answer, please show your code (formatted using Markdown) or make a snapshot of your workspace and post the link to it here.

1 Answer

I found my problem. I didn't add a comma after the last song when I added the new one. I did that, and now it works!

Steven Parker
Steven Parker
229,744 Points

Congratulations on resolving your own issue! :+1: