4/8 what's wrong with my code!


#1

Im getting a syntax error for the following:

var friends = {
bill: {
    firstName: "Bill",
    lastName: "Gates",
    number: "555-555-5555"
}
steve: {
    firstName: "Steve",
    lastName: "Jobs",
    number: "525-555-5555"
}
};

#2

var friends = {
bill: {
firstName: "Bill",
lastName: "Gates",
number: 555-555-5555
};
steve: {
firstName: "Steve",
lastName: "Jobs",
number: 525-555-5555
}
};

don't use braces on integer values


#3

You're not wrong because you put quotes around your phone number. Putting quotes around the phone number only makes it a string which is totally fine. But what you did miss is a comma between bill and steve.

var friends = {
bill: {
firstName: "Bill",
lastName: "Gates",
number: "555-555-5555"
}, //YOU MISSED A COMMA HERE.
steve: {
firstName: "Steve",
lastName: "Jobs",
number: "525-555-5555"
}
};

gotta keep your keys separated with commas! you were close though!


#4

Thanks, I had the same problem of forgetting the comma. :smile:


#5

i do not see a , after your first internal object