Help me 2/6


#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"
};
var contacts = new Array(bob, mary);
console.log=(mary. phoneNumber)

//This is my code and when i run it it says: Oops, try again. Did you remember to print out mary's phone number?
//what's wrong with my code or is something wrong with codecademy?


#2

Try this:

var bob = {
firstName: "Bob",
lastName: "Jones",
phoneNumber: "(650) 777-7777",
email: "bob.jones@example.com"
};

var mary = Object();
mary.firstName = "Mary";
mary.lastName = "Johnson";
mary.phoneNumber = "(650) 888 - 8888",
mary.email = "mary.johnson@example.com";

var contacts = new Array();
contacts[0] = bob;
contacts[1] = mary;

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


#3

thank you bud it helped


#4

there is no = sign after console.log.
it should be console.log();


#5

Solution is simple but confusing: the "Hint" is misleading.
This is the way it should be in 2/6:
var contacts = [bob, mary];
console.log(contacts[1].phoneNumber);
Hint suggests:
var contacts = ["bob", "mary"];
as arrays usually looks. No explanation.


#7