Profile Lookup Challenge JS

function lookUpProfile(firstName, prop){
// Only change code below this line
var myArr=[];
for(var i=0;i<=contacts.length-1;i++){
  myArr.push(contacts[i].firstName);}
  if(myArr.includes(firstName)){
  var a=myArr.indexOf(firstName);
   if(contacts[a].hasOwnProperty(prop)){
    console.log(contacts[a][prop]);
  }else{
    console.log("No such property");
  } 
  
}else {
  console.log("No such contact");
}
}
// Only change code above this line

  

// Change these values to test your function
lookUpProfile("Akira", "likes");

My code works perfectly with Chrome console. I’ve tried every scenario and it works but challenge doesn’t execute my code. The console section is blank. Now i cant pass the challenge. Can anybody help?

You are not returning anything.

i changed and passed it.thanks