Contact list - 7. Search for friend


#1



https://www.codecademy.com/en/courses/javascript-beginner-en-3bmfN/0/7?curriculum_id=506324b3a7dffd00020bf661


Oops, try again. There was a problem with your syntax.
SyntaxError: Invalid shorthand property initializer


Replace this line with your code. 
var friends = {};
    friends.bill = {
        firstName: "Bill",
        lastName: "Gates",
        number: "(206) 555-5555",
        address = ['One Microsoft Way','Redmond','WA','98052']
        };
    friends.steve = {
        firstName: "Steve",
        lastName: "Jobs",
        number: "(408) 555-5555"
        address = ['One Microsoft Way','Redmond','WA','98052']
        };
    
      
    
    var list = function (obj) {
        for (var prop in obj) {
            console.log(prop);
        }
    };
    
    var search = function (name) {
        for (var prop in friends) {
            if (friends[prop].firstName === name) {
            console.log(friends[prop]);
            return friends[prop];
            }
            
        }
    };
    list();
    search("Steve");


#2

The above property is missing the closing comma.


#3

corrected, that wasn't the case

error stays the same


#4

HI and both your address here

address = ['One Microsoft Way','Redmond','WA','98052']
ddress = ['One Microsoft Way','Redmond','WA','98052']

You have = instead of :


#5

thanks, man! that's the problem.