4. Adding properties syntax error


#1

I set it up like the example and I am still getting an Unexpected Identifier error, any ideas?

var friends = {
bill: {
firstName: "Bill",
lastName: "Gates",
number: "(206) 555-5555"
}
steve: {
firstName: "Steve",
lastName: "Stevington",
number: "(765) 903-5768"
}
};


#2

number: "(206) 555-5555"
} // missing ,

you miss , to separate the bill and steve property


#4

possible, yes. But i try to stay as close to learners code as possible. There are multiply ways to create objects


#5

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