6.List em all. Syntax error plz help


#1

var friends = {
bill: {
firstName:"Bill",
lastName:"Gates",
number: 5,
address: ['Microsoft.com','netborwser', 420]
},
steve: {
firstName:"Steve",
lastName:"Jobs",
number: 5,
address: ['Apple.com','netbrowser', 69]
},
clyde: {
address: [23]
},
richard: {
address: [2]
},
var list = function(friends){
for(var i in friends)
console.log(i);
}
}

Syntax error. o.o PLZ HELP! T.T


#2

Hi,
On first glance it looks like you're missing a curly bracket on line one

should be
var friends = {};

I'd love to say I know why but I don't
also I think you need quotes round your number e.g.

number: "5",

also at the end of each friend listing you should finish with }; not },
and at the very end your curly bracket should have a ;

I'm just learning so that's probably the extent of my knowledge
good luck,
Hennifer


#3

One more problem to be honest... at lastName: "Gates", cuz of the : I get an unexpected token : If i remove it than it gives another error.