Search for a friend


#1


I really don't know what im missing?

var friends =  {
    bill:{
        firstName:"Bill",
        lastName:"Snow",
        number: "0652343442",
        address: ["Amsterdam","Noordholland", "RA", "23424"]
        },
        
    steve:{
        firstname:"Steve",
        lastName:"Anderson",
        number: "0652345034",
        address: ["Zaandam","Zuidholland", "TX", "45442"]
        }
    }; 
    
var list = function(friends){
    for(var list in friends){
    console.log(list);
    }
}
    
var search = function(name) {
    for(var key in friends) {
        if(friends[key].firstName === name) {
            console.log(friends[key]);
            return friends[key];
        }else{
            console.log("No contact found");
            }
    }
}
search("Steve");


#2

steve object has no firstName property


#3

Thanks Stetim!

I had already found my problem, but thank you very much!


#4