JavaScript básico - Búsqueda de perfiles

Why does’nt work???
" ```
lookUpProfile(“Kristian”, “lastName”)

debe devolver la cadena


lookUpProfile(“Sherlock”, “likes”)

debe devolver

[“Intriguing Cases”, “Violin”]

lookUpProfile(“Harry”, “likes”)

debe devolver un arreglo // pruebas completadas // salida de consola No such contact"

// Configuración
const contacts = [
    firstName: "Akira",
    lastName: "Laine",
    number: "0543236543",
    likes: ["Pizza", "Coding", "Brownie Points"],
    firstName: "Harry",
    lastName: "Potter",
    number: "0994372684",
    likes: ["Hogwarts", "Magic", "Hagrid"],
    firstName: "Sherlock",
    lastName: "Holmes",
    number: "0487345643",
    likes: ["Intriguing Cases", "Violin"],
    firstName: "Kristian",
    lastName: "Vos",
    number: "unknown",
    likes: ["JavaScript", "Gaming", "Foxes"],

function lookUpProfile(name, prop) {
  // Cambia solo el código debajo de esta línea
  for (let i = 0; i < contacts.length; i++){
    if (name == contacts[i].firstName && contacts[i].hasOwnProperty(prop)){
      return contacts[i][prop]
    else if (name != contacts[i].firstName){
      return "No such contact"
    else if (!contacts[i.hasOwnProperty(prop)]){
      return "No such property"
  // Cambia solo el código encima de esta línea

console.log(lookUpProfile("Kristian", "likess"));

Información de tu navegador:

El agente de usuario es: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36 Edg/107.0.1418.42

Desafío: JavaScript básico - Búsqueda de perfiles

Enlaza al desafío:

You never loop through all the objects.

I would suggest you look at hints 2 and 3 on the hints page without looking at the solutions. There are also a lot of threads for this challenge.