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 trialIsrat Ali
5,358 PointsWhy is this code not running?
This is the error message I get! Bummer! Try again; there seems to be a problem with your JSON! Error: 757: unexpected token at '"songs" : []'
"songs" : []
5 Answers
Muhammad Fitri
5,018 PointsIt said first "start with empty array", so just put array, []
Israt Ali
5,358 PointsYes, just placing an emply array [] was the right way to proceed to the task.
Darren Joy
19,573 PointsNot sure what you are trying to do here: Can you throw down some info or code on what the exercise is?
Darren Joy
19,573 PointsIf, as Muhammad said it's creating an empty string, then "songs" : (colon) [] won't do it.
You need to define 'something' as the empty array, more like this....
something = (equals) 'empty array'
the empty square brackets should work for the empty array, it's the "songs" : part that doesn't look right.
Also, "" (quotation marks) usually denote the contents of a string. If you are defining the array you wouldn't use "" around it's name to create it
Darren Joy
19,573 PointsJust adding that I went back and looked at the assignment. My info was about creating an array for a javascript file.
The question pertained to creating a JSON file with the .json extension...
No need to define variables there... as M Fitri said
Israt Ali
5,358 PointsIsrat Ali
5,358 PointsYes, that worked!
Israt Ali
5,358 PointsIsrat Ali
5,358 PointsYes, that worked!