Displaying people issue


#1

var contacts = [bob, mary];

// printPerson added here
var printPerson = function(person) {
console.log(person.firstName + " " + person.lastName);
}

console.log(printPerson[0]);
console.log(printPerson[1]);

Alright, so it says this "It looks like your function didn't log "Bob Jones" to the console. Did you remember to call your function on bob?" and I did call on Bob at the end because he is person 0, I think that my mistake was in the function but I don't know where.


#2

Nevermind I got it! It wasn't my function that was wrong and it was how I called them!

I changed the bit at the end to:
printPerson(contacts[0]);
printPerson(contacts[1]);

and it worked!