Some problem output is not showing

var contacts = [

    {

        "firstName":"Akira",

        "lastName": "Laine",

        "number": "03930953",

        "likes": ["Pizza","Coding","Brownie Points"]

    },

    {

        "firstName":"Harry",

        "lastName": "Potter",

        "number":"083290842309",

        "likes":["Hogwarts","Magic","Hagrid"]

    },

    {

        "firstName":"Sherlock",

        "lastName":"Holmes",

        "number":"218093840923",

        "likes":["Intriguing Cases","Violin"]      

    },

    {

        "firstName":"Kristian",

        "lastName":"Vos",

        "number":"unknown",

        "likes":["Javascript","Gaming","Foxes"]

    }

];

function lookUpProfile(name, prop){

    for(var i = 0; i < contacts.length; i++){

        if(contacts[i].firstName === name){

            return contact[i][prop] || "No such property"

        }

    }

    return "No such contact"

}

var data = lookUpProfile("Akira","likes");

document.write(data)

edit :show no error in visual studio code

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Note: Backticks are not single quotes.

markdown_Forums

you need to use console.log() to see the output
document.write() change the html of a page, but there is no html to change here