LIST: I apparently have a syntax error but I can't find it


#1

var friends={
bill: {
firstName: "Bill",
lastName: "Cosby",
number: "1",
address:["One", "two"]
},
steve: {
firstName: "Steve",
lastName: "Buschemi",
number: "2",
address: ["three","four"]
}
};
var list =function(friend){
for(var friend in friends){
console.log(friend);
}
list(friends);


#2

You haven't closed the "list" function. Look at the function and you have 2 opening curly braces " { " but you only have 1 closing curly brace " } " You need to add " }; " at the end.


#3

Okay, I really must look stupid, it works now
I tried everything else but didn't look in the obivious places
Thank you


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.