7. Search for a friend


Not sure what I'm doing wrong. This is my code:

var friends = {

bill: {
firstName: "bill",
lastName: "gates",
number: "206-555-1234",
address: ['One Microsoft Way', 'Redmond', 'WA', '98052']

steve: {
firstName: "steve",
lastName: "jobs",
number: "415-555-1234",
address: ['1 Infinite Loop', 'Cupertino', 'CA', '95014']

var list = function(friends) {
for (var key in friends) {

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


Error message:
Oops, try again. It looks like your search function doesn't return contact information for Steve.

{ firstName: 'steve',
lastName: 'jobs',
number: '415-555-1234',
address: [ '1 Infinite Loop', 'Cupertino', 'CA', '95014' ] }
{"firstName":"steve","lastName":"jobs","number":"415-555-1234","address":["1 Infinite Loop","Cupertino","CA","95014"]}

Thinking it has something to do with my function, but I'm not sure at this point. It might be me looking at this for WAY too long, or something else entirely. Thanks y'all.




The course expects
the firstName-Value to start with a capitalized character like "Steve" and "Bill"

So change those Value's and then use



In some sections of this course, the course-checker Display's data
this you could then identify by placing to EXTRA code-line's:
console.log( "== My End ==" );
console.log( "== All that is displayed now, is the course-checker ==" );


Yeah, I just capitalized the names within the objects and the name in the search function. Thank you!