5/8 SyntaxError: Unexpected identifier


#1

var friends = {
bill:
{
firstName:"Bill",
lastName:"Gates",
number: "(232) 321-1321",
address: ['Ablan','Batac','Ilocos','Norte','2906']
}
steve:
{
firstName:"Steve",
lastName:"Kerr",
number:"(453) 423- 2312",
address: ['Ablan','Batac','Ilocos','Norte','2906']
}
};
/*friends.name = {
Name: "Shandy",
Age: 25,
Address: ['Ablan','Batac','Ilocos','Norte','2906'],
Telephone: "(234) 232-7872"

};*/

I dont know the problem pls help me, its says "SyntaxError: Unexpected identifier"


#2

Oh, here the problem is
Inside the friends array, You are adding more arrays, so you need to be a bit more careful here, cause even a comma can get you a head-ache ( HAHA yes it happens :frowning: )

So Here's how you should do this
var friends = {
bill: {
// About bill goes here
}, // Don't forget that this is an array and you need to put a comma after each element! ( this is what you missed)
steve:{
// About Steve
}
};

Hope that helped
;


#3

Helped me! Thanks a lot!