Pass and doble check?


#1

this is my code ,is it all correct ??

var friends = {
steve: {
    firstName:"Steve",
    lastName:"Job",
    number:"(000)111-222",
    address: ['no']
 },
  bill: {
    firstName:"Bill",
    lastName:"Gates",
    number:"(123)123-123",
    address: ['no']
    }
};

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

#2

Are you receiving an error? If so, what does it say?


#3

it pass and show this ,is it correct?? thanks

{ firstName: 'Steve', lastName: 'Job', number: '(000)111-222', address: [ 'no' ] }
{ firstName: 'Steve', lastName: 'Job', number: '(000)111-222', address: [ 'no' ] }
{ firstName: 'Bill', lastName: 'Gates', number: '(123)123-123', address: [ 'no' ] }


#4

@ericching
Is it posting any error message not letting you past this lesson?


#5

no error message , I pass it ...just not sure I am correct or not .


#6

Looks correct, and if you passed, I'm sure it is.