6/8 SyntaxError: Unexpected identifier


#1

It shows me Oops, try again. There was a problem with your syntax. and SyntaxError: Unexpected identifier in the console. This code doesn't seem to work.
var friends = {
bill: {
firstName: "Bill",
lastName: "Gates",
number: "777 777 7777",
address: ["One Microsoft Way","Redmond","WA","98052"]
}
steve: {
firstName: "Steve",
lastName: "Jobs",
number: "555 555 5555",
address: ["Apple", "Fruit", "WA", "56745"]
}
var list = function (friends) {
for (var key in object) {
console.log(key);
}
}
}


#2

The above function is written inside the friends object, which is not closed until the very end.

var friends = {
    bill: {},
    steve: {}
};
var list = function (object) {
    // note the name of the parameter variable
};

#3

It worked! Thank you!