4. Listing Everybody - debugging i guess



so its pretty likely that im just being stupid since that happens often but up until this point i think my code has worked in the previous exercises so i think i get the gist and ive looked at other peoples code and cant seem to see the problem..
it says:
'Oops, try again. It looks like your list function didn't console.log "Bob Jones". Did you remember to call list(); after creating it?'

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",
    email: "mary.johnson@example.com"

var contacts = [bob, mary];

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

 var list = function() {
    var contactsLength = contacts.length;
    for (var i = 0; i < contacts.length; i++) {

sorry if the prob is just, fundamental, and glaringly obvious.


What is this line for, as you don't use contactsLength. (This is just a wasted effort, not an "ACTUAL" problem)

Here is the actual problem. Your command is telling the computer to log contacts[i] which would be bob or mary. It should be giving it to printPerson()


nice, thanks, sorry i was very tired last night. always code when im half asleep its such a bad idea