Profile Lookup error - help needed!

Profile Lookup error - help needed!
0.0 0

#1

please do see what’s the error in my code??`function lookUpProfile(firstName, prop){
// Only change code below this line
for(i=0 ; i<contacts.length ; i++) {
if(contacts[i].firstname === firstName) {
if(contacts.prop) {
return contacts[i][prop];
}else {
return “No such property”;
}
} else {
return “No such contact”;
}

}
// Only change code above this line
}`


#2

What does return do and how are you checking all values?