More People Problem


#1

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

var mary = {
firstName: "Mary Johnson",
lastName: "Jones",
phoneNumber: "(650) 888 - 8888",
email: "mary.johnson@example.com"
};
var contacts = ["bob ","mary"];
console.log(contacts[1].phoneNumber)


#2

var contacts = ["bob ","mary"];
you shouldn't have quotation mark for bob and mary.
you need quotation mark for string


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.