2/6 whats wrong?


#1
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("(650) 888-8888")

Oops, try again. Did you remember to print out mary's phone number?


#2

In this exercise you should retrieve data from object or from array of objects:

console.log(mary.phoneNumber);

or:

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

You can also simply print it out, but this way is not consistent with the instructions. Problem with your code is that you have printed phone number in different format (spaces!).