Hey I need help with this code


#1


i am not sure I understand what I need to do and if I did understand I'm not sure I did it right


'Oops, try again. It looks like your list function isn't printing the right output.'


var friends ={
    bill: {
        firstName: 'Bill',
        lastName: 'Gates',
        number:'(206) 555-5555',
        address: ['One Microsoft Way','Redmond','WA','98052']
        },
    steve: {
        firstName: 'Steve',
        lastName: 'Jobs',
        number:'(206) 555-5555',
        address: ['One apple street','Redmond','WA','98052']
        }
    
    };

var list = function(){
    for(var i = 0; i < friends.length; i++)
    console.log(friends[i])
    };


#2

you should use a for in loop as explained in the lesson


#3

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