5/6: Finding that Special Someone to print ONLY the match


Per instruction #4:
Have the function run printPerson on the person if and only if the lastName property of the person matches the lastName argument.

I am reading the instructions that it should ONLY print the name of Bob Jones and exclude Mary Johnson, but my console names both entries.

var search = function(lastName) {
 var contactsLength = contacts.length;
 var lastName = contacts.lastName;
    for (var i = 0; i < contactsLength; i++) {
        if (lastName === contacts[i].lastName) {        


printPerson() needs to have a paremeter.



Would it be alright to ask if you could explain why? I find Codecademy often skips out on important things like this.