Help!


#1

it keeps saying "not returning contact information for steve" or something of that nature and i'm not sure why? Here is the code verbatim from the exercise as I typed it

var friends = {
bill: {
firstName: "Bill",
lastName: "Gates",
number: "(206) 555-555",
address: ['One Microsoft Way', 'Redmond', 'WA', '98052']
},
steve: {
firstName: "Steve",
lastName: "Jobs",
number: "(205) 555-5555",
address: ['Shoulda Done Chemo Drive', 'SanFran', 'CA', '92873']
}
};
var list = function(friends){
for( var x in friends){
console.log(x);
}
}
list(friends);

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


#2

var friends = {
bill: {
firstName: "Bill",
lastName: "Gates",
number: "(206) 555-555",
address: ['One Microsoft Way', 'Redmond', 'WA', '98052']
},
steve: {
firstName: "Steve",
lastName: "Jobs",
number: "(205) 555-5555",
address: ['Shoulda Done Chemo Drive', 'SanFran', 'CA', '92873']
}
};
var list = function(friends){
for( var x in friends){
console.log(x);
}
}
list(friends);

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

or if I do this it says ReferenceError: steve is not define


#3

Hey @dckeywork! Your problem here is (I will be refering to first post), here:

Found it? If not you mispelled firstname, not mispelled but its not in camel-case. So it has to be firstName instead of firstname


#4

those little errors.... they will be the death of me! Thanks! I'll get better about this stuff i promise lol


#5

Hey no problem this viedo will help you out a lot as well!