Building An Address List


My code runs and I have correct output for this exercise but I i'm told that Bob is not being logged to the console? Can anyone see where i'm going wrong?

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];

// printPerson added here

var printPerson = function(person){
    console.log(person.firstName + " ");



Hi in your printPerson function these line

console.log(person.firstName + " ");

will print each firstName and lastNAme on his line instead of

Bob Jones
Mary Johnson

Put just one console.log() like that

console.log(person.firstName + " " + person.lastName);


and now i've looked again I can see that I have two seperate console.log statements rather than one. and thankyou wizmarco.