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 trialAlex Warner
Courses Plus Student 4,987 PointsBug? The code challenge is asking my to create an empty JavaScript array which should be var myArray = [];
The first step is to create an empty JavaScript array. There's no instruction as far as what to call it. I'm entering var songs = []; and it's returning an error.
var songs = [];
1 Answer
Jennifer Nordell
Treehouse TeacherHi there! No, it's not a bug. Take a look at the file name. It's "songs.json". This is not a JavaScript file, this is a JSON file. There is no variable declaration nor semicolon needed. The only thing needed here is an empty set of square brackets.
Hope this helps!
Scott Laughead
12,750 PointsScott Laughead
12,750 PointsYou're creating an array called "songs". Try changing that to myArray.