Kindly help me with the code below.I am getting an error as shown below


#1



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


ERROR : 'Make sure that mary is the second object in contacts'


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 you shouldn't put the " " around the names in

var contacts= ["bob","mary"];

because they are object so if you put " " around them it make them Strings


#3

you are taking object into an array

no need quote

var contacts= ["bob","mary"];//wrong
@anushree27


#4

Hey thanks a lot for the help :slight_smile:


#5

thanks a lot for the help :slight_smile: