6. List 'em all! Problem


#1

Here is my code :slightly_smiling:

var friends = {
john: {
firstName: 'John',
lastName: 'Stones',
number: '555 333 444',
address: ['Bostom 2555']
},

bill: {
    firstName: 'Bill',
    lastName: 'Gates',
    number: '555 111 222',
    address: ['Los Angelis 254']
},
steve: {
    firstName: 'Steve',
    lastName: 'Jobs',
    number: '555 555 222 ',
    address: ['New York 3467']
}

var list = function(friends){
    for(var firstName in friends){
        console.log(firstName);
    }
}

};

When I hit "Save & Submit code" it shows me:

SyntaxError: missing } after property list

Can anybody help me?


#2

@gigablaster70715
Make sure after steve to end the variable friends using a semicolon so it doesn't confuse with the other variable list you declared. Also, end the variable list with a semicolon. Hope this helped you.


#3

Hi I think that your function list should be outside your object friends.


#4

You are right. It works now. Thank you