Unexpected Identifier?


#1



https://www.codecademy.com/courses/building-an-address-book/0/2?curriculum_id=506324b3a7dffd00020bf661#


Says "Unexpected identifier". What is wrong with this bit of code ? I'm asked to print out Mary's phone number.


var bob = {
    firstName: "Bob",
    lastName: "Jones",
    phoneNumber: "(650) 777-7777",
    email: "bob.jones@example.com"
};
var mary = {
    firstName: "Mary",
    lastName: "Johnson",
    phoneNumber: "(650) 888 - 8888"
    email: "mary.johnson@example.com"
};
contacts = [bob,mary];
console.log(contacts[1].phoneNumber)


#2

HI in mary object this line

phoneNumber: "(650) 888 - 8888"

it's missing the comma


#3

What a silly mistake ! Thanks for enlightening me lol ....


#4

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