[4/6] Printing the double


Hello, this code goes through the editor approving the correct, though it prints two times the same contacts to the console. What is actually wrong? How to make it print only the contacts for one time?

var contacts = [bob, mary];

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

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



I actually have no idea. Just noticed mine does that too :smiley:. Clueless me.


Try taking out this:



The output is duplicated because the lesson checker is running the code to test it. You may ignore the secondary output.