To jest JavaScript
//this refer to global object or window object
//but when we call this inside method of object it refers to current object
console.log(this===window)//true
let user = {
name: "Shirshak",
age: 25,
sayHi() {
// "this" is the "current object"
console.log(this.name); //print shirshak
}
};
Shirshak kandel