4. Adding Properties


var friends = {
bill: {
firstName: "Bill",
lastName: "Gates",
number: "287 928 87 99"
steve: {
firstName: "Steve",
lastName: "Jobs",
number: "872 897 87 54"

When I delete the steve part there is no error but if I don't delete it
"SyntaxError: Unexpected identifier 'steve'. Expected '}' to end a object literal." this error appears. Why is this happening? I'm using the same syntax for both.


you need a semi colon at the end of each object

var friends = bill: {};
steve: {};


you have to just put comma after bill{},


Try putting a coma after the bill object.


Thank you! I was stuck with the same error as the original poster. Thanks to your comment, I see what I did wrong and have learned a significant syntax lesson!