7. Search for a friend :/


I don't know what is wrong in this code :rage:

var friends = {};
friends.bill = {
    firstName: 'bill',
    lastName: 'abo bill',
    address: ['One Microsoft Way','Redmond','WA','98052']
friends.steve = {
    firstName: 'steve',
    lastName: 'abo steve',
    address: ['One Microsoft Way','Redmond','WA','98052']
var list = function(name){
    for ( var key in name){
var search = function(name){
    for ( var key in friends){
        if(friends[key].firstName === name) {
            return friends[key];


Your last name on each of the people is wrong it should be Gates and Jobs and the first names should be capitalized.

and the last line of code steve should be capitalized.

this is the number for Bill number: "(206) 555-5555",

and this is the number for Steve number: "(408) 555-5555",

I hoped that worked for you


Thanks legendsoftomorrow it's worked :smile: