5: can't figure what's wrong with my code


#1


5: Finding that someone special- I don't get the error and what's wrong with my code


Error: It looks like your search function didn't log "Bob Jones" to the console. Did you remember to call search after you defined it?


Replace this line with your code. 
function search(lastName){
var contactsLength=contacts.length;
for (var i=0;i<contacts.Length; i++)
{if (contacts[i].lastName===lastName){printPerson(contacts[i]);}
}};

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

search("Jones");


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.