Unexpected token for 14


#1

Hi

Can you tell me where I'm going wrong? I keep an error message saying there was an unexpected token. This is the code:

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


#2

You need the end parenthesis... for (var i = 0; i < contactsLength; i++) {