More People


#1


More People


Error:Syntax Error Invalid short hand property initializer
CodeAcademy:
Oops, try again. There was a problem with your syntax.

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"
};

var contacts = [bob,mary];

console.log(contacts[1].phoneNumber);


#2

To print out mary's phone number you don't access it as if you are accessing a list but access it directly ,

console.log(mary.phoneNumber)


#3

You have an = sign on these 2:

firstName = "Mary",
    lastName = "Johnson",

Change them so that they have colons instead of equal signs, like the rest of them.

 firstName: "Mary",
    lastName: "Johnson",

Then, do what @bandit says, :grinning:


#4

It still didnt work when cleaning those errors


#5

Post your updated code


#7

gustaxpa your console.log is fine only changefirstName = "Mary",
lastName = "Johnson", to firstName: "Mary",
lastName: "Johnson",