This in javascript

Hi Mosh,
I hope you are great!

I am writing this below code in the browser console,

const person = {

talk() {

console.log(this);

},

};

person.talk();

the above code is not returning the reference to the object but when i write person.talk, it returns it.

I don`t know how you are getting the results in tutorial while writing the above code.
Please correct me what is wrong here. thanks.

person is the reference to the object. person.talk() calls the talk method, which logs the object to the console. It seems to be working okay to me. What are you expecting it to do instead?