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


i cant make out the error in it

var friends = {
bill : {
firstName: 'Bill',
lastName: 'Gates',
number: 7896888944,
address:['One Microsoft Way','Redmond','WA','98052']
steve: {
fisrtName: 'Steve',
lastName: 'Jobs',
number: 9566193405,
address: ['One apple Way','Bodakdev','MA','18000']
var list = function(obj) {
for (var key in obj) {
var search = function(name){
for (var i in friends) {
if (friends[i].firstName===name) {
return friends[i];



Have close look at



I'm having trouble with this one too. I passed it, but I'm not sure if I did it properly.

Anyway, what I did was pretty much the same as you except for the search function in the console and return I did this:

return friends[i].address);

As an aside, for the list function, I have "friends" as the object that the key loops through in the for/in loop. I ended up taking out that parameter with no errors.
var list = function(){
for (var key in friends){
I don't really get what it's for yet.


Now I see that everything I said is wrong after going through the lesson again from the beginning.

leonhard.wettengmx.n is right

Codecademy is great, and I appreciate that it's a free service. I hope they are aware of the problem of letting people pass even with the wrong answers (just look at mine above). Either way, I'm still grateful.


i dont see the error still can be more specific


@kavyajeet, @scriptrockstar36412,

+++ friends list and search and for-in explained.
Look here for an explanation


ok ok got it
i thought there was a mistake in my syntax
but when you come to know that its a spelling mistake, you feel great then :smiley: