4.) Adding Properties: Unexpected Identifier?


#1

I do not know what it means by unexpected identifier. Does this mean one of my keys needs to be defined? Or something else?


var friends = {};
friends.bill = {
firstName: "Bill"
lastName: "Gates"
number: "(555) 555-5555" }};
friends.steve = {
firstName: "Steve"
lastName: "Jobs"
number: "(444) 444-4444" }};


#2

It should be like this:

var friends = {};
friends.bill = {
firstName: "Bill",
lastName: "Gates",
number: "(555) 555-5555"
};
friends.steve = {
firstName: "Steve",
lastName: "Jobs",
number: "(444) 444-4444"
};


#3

Thank you very much! Thankfully I was able to figure it out :smiley:


#4

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