At loss - build an address book


Building an address book - 2

I'm getting - "Oops, try again. Make sure that mary is the second object in contacts"
Why is that? I'm sure I'm missing something out here

var contacts = [bob, mary];
var bob = {
    firstName: "Bob",
    lastName: "Jones",
    phoneNumber: "(650) 777-7777",
    email: ""

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


code runs from top to bottom, you can't store objects which are defined yet into a array, move the array to after the objects declaration

Fascinating, defining the array first, then create the objects seems to be possible, but the checking script doesn't like it. Still, to pass the exercise move the array to after the object declaration


Hey thanks, I was about to take a break and have some snacks


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