List them all error please help!


#1

var friends ={
bill:{
firstName: "Bill",
lastName: "Gates",
number: "(206) 555-5555",
address: ['1 Noltenius way', 'Gray', 'NT', '0830' ]
},
steve:{
firstName: "Steve",
lastName: "Jobs",
number: "(206) 333-6666",
address: ['14 Flinders Rd', 'Melton', 'Vic', '3338']
},
var list = function (friends) {
for(var firstName in friends) {
console.log(firstName);
}
}
};

error - SyntaxError: missing : after property id
I cant see the issue.
Thanks


#2

Hi can you try to put the list function outside the friends object.


#3

Thank You that worked