What's wrong with my code? Oops, try again. Did you give each of your friends an address property?


#1


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

Did you give each of your friends an address property?

var friends={
    name:'duyen',
    age:16,
    bill:{
        firstName: "bill",
        lastName: "gates",
        number: "0976698193",
        address: ['microsoft','america']
        },
    steve:{
        firstName: "steve",
        lastName:"jobs",
        number:"0964890290",
        address: ['apple','america']
        }
};


#2

You need to create another property for your friends object, with all of the same properties including the new address property. Thus, your code should be like this:

var friends={
    bill:{
        firstName: "bill",
        lastName: "gates",
        number: "0976698193",
        address: ['microsoft','america']
        },
    steve:{
        firstName: "steve",
        lastName:"jobs",
        number:"0964890290",
        address: ['apple','america']
        }
   duyen:{
        firstName: //put name here
        lastName: //put name here
        number: //put number here
        address: //put address here
        }
 
};

Hope this helped and happy coding! :smiley:


#3

thank you very much, it works :grin::grin:


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.