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Łukasz Czuliński
8,646 Points'AJAX Basics' challenge: what am I missing?
I feel pretty foolish here as I'm sure this is quite trivial.
"In this challenge, you'll create a JSON file containing a string that's formatted as an array of JavaScript objects. The file will contain an array of songs, each with a song title and artist. Start by creating an empty array."
I have tried:
var empty = new Array();
[];
[{}];
I somehow can't find this even after a few Googles.
6 Answers
Hugo Paz
15,622 PointsSecond one but remove the semi-colon. So its just []
Christian Linnerud
7,312 Points["empty array"] //If you paste this you will pass task 1 of 4.
Heba Hendy
7,786 Points[]
Laura Rodriguez
8,284 PointsAfter long time looking the mistake I got it!
[{"title": "Shakira","artist":"Wakawaka"}]
:D
Tom Nguyen
33,500 PointsThis is what I used to pass:
[
{
"title" : "song_title" ,
"artist" : "artist_name"
}
]
MUZ141096 Martin Mushangwe
6,859 PointsIts only the [] without semi colon
Łukasz Czuliński
8,646 PointsŁukasz Czuliński
8,646 PointsThank you sir! I knew it was going to be something like that.