Javascript:Contact List(Tossing in an Array)


#1

I need some help here.I dont know whats wrong in my codes below.
It always give me " SyntaxError: Unexpected identifier" result.

var friends = {
     bill: {
         firstName: "Bill",
         lastName: "Gates",
         number: "(206) 555-5555",
         address: ['One Microsoft Way,Redmond,WA,98052']
    
         }
     steve: {
         firstName: "Steve",
         lastName: "Jobs",
         number: "099 4545",
         address: ['2101 Waverley Street.Palo Alto, CA 94301.']
         }
};

SyntaxError: Unexpected identifier


#2

bill and steve should be separated by comma.


#3

thank you :slight_smile:


#4

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