I’m having trouble getting my code to pass the Profile lookup coding challenge. Here is what I have.
for (var i = 0; i < contacts.length; i++) {
if(contacts[i].firstName === name) {
return contacts[i][prop] || "No such property";
}
}
return "No such contact";
}