#2 : Is this lesson bugged?


#1

What have I done incorrectly to get the message "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@example.com"
};

var contacts = [bob,mary]
console.log = (contacts[1].phoneNumber);

`


#2

Hi this Line

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

First remove the = after console.log then refresh the Page


#3

Segue código corrigido:

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);


#4

Try doing this

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 = new Array();
contacts[0] = bob;
contacts[1] = mary;
console.log(contacts[1].phoneNumber);