[solved]7. Search for a friend Help


#1


7. Search for a friend


HELP

Oops, try again. It looks like your search function doesn't return contact information for Bill.

var friends={
    bill: {
        firsName: "Bill",
        lastNamr: "Gates",
        number: "(205) 323-6500",
        address:[ '1000 green springs ave s','Birmingham','Al','35205']
        },
        
    steve: {
        firstName: 'Steve',
        lastName: 'Karki',
        number: '2053236501',
        address: ['729 20th st s', 'Birmingham','Al', '35233']
        }
};

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

};

var search = function(name) {
    for(var key in friends) {
        if(friends[key].firstName === name) {
            console.log(friends[key]);
            return friends[key];
        }
    }
};

search('Bill');


#2

I figured it out. just some misstyped.


#3