I keep getting, "Did you remember to print out mary's phone number?"


#1



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


"Did you remember 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@exmaple.com"
    };
    
var contacts = [bob, mary];


for (var i = 0; i < contacts.length; i++) {
    console.log(contacts[i]);
    
}


#2

Hi the error says

"Did you remember to print out mary's phone number?"

so instead of print all the propiety of bob and mary you should just print the phoneNumber of mary like that

console.log(may.phoneNumber)

or with your code inide the console.log() you could add .phoneNumber like that it will print all the phonenumber inside your object friends, like that

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

#3

Thank you Wizmarco!

That was just me reading the assignment incorrectly. Thanks!