Building an Address Book 2/6: What am I doing wrong?!


Hey, fellow coders. I'm in a bit of a jam I can't get out of. Here's a link to the said lesson:

So here's the issue. Whenever I submit anything more than the two people objects, I get an error saying: Oops, try again. Make sure that mary is the second object in contacts! Uh, she is, isn't she? I tried the forums, reloading my browser, all that stuff. Is there something wrong with my code? Here it is:

var bob = {
firstName: "Bob",
lastName: "Jones",
phoneNumber: "(650) 777-7777",
email: ""

var mary = {
firstName: "Mary",
lastName: "Johnson",
phoneNumber: "(650) 888 - 8888",
email: ""

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


Thanks in advance!


var contacts = ["bob","Mary"];// wrong
var contacts = [bob,Mary];//right

because bob and mary both are object not string :slight_smile: