Whats wrong with my code? 5


#1



Replace this line with your code. 

var address;
var friends = new Object();
friends.bill=new Object();
friends.steve=new Object();
var friends={
friends.bill :  {
    firstName: "Bill",
    lastName:"Gates",
    number: "(206)555-5555",
    address:[1608, "CIG" , "Hyderabad"]
}
friends.steve : {
    firstName: "Steve",
    lastName: "Jobs" ,
    number: "(206)666-6666",
    address:[1609, "LIG" , "Hyderabad"]
}
};


#2

Have a look at your instructions again: look at the example:

var friends = {
    bill: {
        firstName: "Bill",
        lastName: "Gates",
        number: "(206) 555-5555",
        address: ['One Microsoft Way','Redmond','WA','98052']
    }
};

Remember to add a comma to separate },

You are mixing the two notions remove the above ^


#3

it says erroe still can you pls help?


#4

closing bracket of bill you need a comma: },


#5

thanks a lot you removed my stress!!! :blush:


#6

how can i do it with constructors?


#7

I like how Leon explained it here, have a look I'm sure you will understand it better once you have read the post :slight_smile:


#8