4/6 Listing Everybody - Confused


#1

Hi guys just wondering if u can help. How can I fix the output?


#2

Remove the console.log part from the list function. printPerson function is there to log their names and you want to use the for loop only to call that function for every object inside the contacts array. It should look like this:

function list() {
var contactsLength = contacts.length;
for (var n = 0; n < contactsLength; n++) {
printPerson(contacts[n]);
};
}


#3

Thanks a ton! I was really annoyed because of this problem.