Lesson 2, it says make sure 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",
 var contacts = ["bob","mary"];


Are you creating an array with "bob" and "mary" ? Did you mean to use bob and mary as the elements? Remember what the assignment calls for. Make mary the 2nd element.

You may find this link on arrays useful:



It says to create an array called contacts and put bob in first and then mary. In my past exercises the elements = the strings inside the array.


I found my error actually thanks.


Could you tell what was the error?
I have the same problem.


The error happened when I tried to log mary but within my contacts array I had "mary", and "bob". I made them into strings when I shouldn't have.


Thanks! It was driving me crazy!


Yea me 2, the small problems are the most annoying really. And when you ask for help sometimes on these forums people just say figure it out yourself. I can see if my syntax is wrong but if its just something small like quotations are parenthesis they can just tell you what you did and why it is wrong. But oh well.


Yeah right, It took an hour and a half to find a round bracket last night! I went to bed feeling a bit depressed :frowning:
I need much more practice!


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