Building an Address Book


#1

Building an Address Book
More People

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

var mary = {
firstName: "Mary",
lastName: "Jonson",
phoneNumber: "(650) 888 - 8888",
email: "mary.jones@example.com"
};

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

console.log(mary.phoneNumber);

in the cosnole i have:
(650) 888 - 8888

but Oops, try again. Make sure that mary is the second object in contacts

I thing mary is the second object in contacts.


#2

You add to your conatcts array two Strings and not two objects.
Remove the quotes around bob and mary.


#3

Hello world!!! First post on Codecademy Forum.
Have the same Address Book problem.


#4

Thanks dookoo_de. That solved it.


#5

My code is exactly like yours, but it appears: SyntaxError: missing before statement.

I've alredy reloaded the page...
Any clue of what it is?
Tks


#6

Without your code we didnt can help you.

Please show your complete Code here.

Thanks


#7

A post was split to a new topic: Building an Address Book - what am I doing wrong


#8