5/8 What's wrong with this code?


#1

var friends = {
name: "Tom",
number: "12345678",
address: ['One Tommy Way','Happyville','SG','88845']
}
friends.bill = {
firstName: "Bill",
lastName: "Gates",
number: "0987654",
address: ['Two Billy Ave','Gladville','MG','00033']
};
friends.steve ={
firstName: "Steve",
lastName: "Jobs",
number: "456789",
address: ['Three Steve Rd','Sadville','LG','99988']
};

I've added address to all 3 friends but why do I still get an error message: "Oops, try again. Did you give each of your friends an address property?"


#2

I don't the exercise asks to add three names. Here, why don't you try this:

var friends = {};
friends.bill = {
    firstName: "Bill",
    lastName: "Gates",
    number: "(400) 222-2222",
    address: ["EUA, Seatle"]
}
friends.steve = {
    firstName: "Steve",
    lastName: "Jobs",
    number: "(300) 111-1111",
    address: ["California, San Francisco"]
}

#3

Iam correct then I click next and it take me to the same question when i write the same answer it says that my answer is wrong, pls help me if you know the answer .

def spam():
eggs = 12
return eggs

print spam()


#4

***Check this buddy, it will work :+1:

:

var friends = {};
friends.bill={
firstName:"Bill",
lastName:"Gates",
number:9526202384,
address:[1835, '73rd Ave NE', 'Medina']
};
friends.steve={
name:"Steve",
lastName:"Jobs",
number:8526357932,
address:[2101 ,'Waverley Street', 'Palo Alto']
};


#5

hey @tgt,

I did some troubleshooting and ended up doing a few things.

var friends = {
bill: {
firstName: "Bill",
lastName: "Gates",
number: "0987654",
address: ['Two Billy Ave','Gladville','MG','00033']},

steve: {
firstName: "Steve",
lastName: "Jobs",
number: "456789",
address: ['Three Steve Rd','Sadville','LG','99988']}}

You kinda did a mix between the two variations of making an object (short hand and long hand...( : vs = ). Notice how before, you did "FRIENDS.BILL ="

You're okay with just adding in "BILL:" instead. I also added a curly bracket at the end and took out your friend tom hahaha