(6. List em all) SyntaxError: missing : after property id


#1

var friends = {

bill: {
firstName: 'Bill',
lastName: 'Gates',
number: '206-555-555',
address: ['One Microsoft Way', 'Redmond', 'WA', '98052']
},

steve: {
   firstName: 'Steve',
   lastName: 'Jobs',
   number: '415-555-555',
   address: ['Zen way', 'Cupertino', 'CA', '94102']
    },
john: {
   firstName: 'John',
   lastName: 'Pequito',
   number: '502-555-555',
   address: ['Lone hair donator', 'Louisville', 'KY', '40204']
    },

    var list = function(friends){
        for (var key in object){
            console.log(friends[key]);


            }
        }

};
list(friends);

I'm not sure what's causing the problem. Any ideas?

Thank so much.


#2

You don't want to put the function in the same spot as the people. Try declaring that function outside of the friends object but before the function call.