Victory!


#1


https://www.codecademy.com/en/courses/javascript-beginner-en-3bmfN/0/8?curriculum_id=506324b3a7dffd00020bf661


"Reference Error: bill is not defined". Stuck on this one. Help pls. Thanks in advance!


var friends = {
    bill:   {
    firstName: "Bill",
    lastName: "Gates",
    number: "(206) 555-5555",
    address : ["One Microsoft Way", "Redmond","WA"]
        },
    steve:  {
    firstName: "Steve",
    lastName: "Jobs",
    number: "(206) 555-5555",
    address: ["1 Infinite Loop", "Cupertino", "CA"]   
        }
};

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

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

list(friends)
search(bill)


#2

Bill is not a variable:

search(bill);

Change to

search("bill");

#3

it's not logging the bill's information


#4

You need to search bill with a capital b as you see above his named Bill not bill

So search("Bill");


#5

Took me awhile to finally finish this. Thanks you!


#6