Stuck on 7


#1


Oops, try again. Did you create a function called search?
please help


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

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

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

}
}
};


#2

This does not look right. Do you see the iffy?


#3

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