Webinar 08: Classes, Prototypes, Async Functions

function alpha () {
this.a = 10
}
// alpha()
// console.log(window)

let obj = {
p: 10,
q: 20,
r: function () {
console.log(this)
alpha()
}
}

obj.r()
console.log(obj.a)
console.log(a)
let x = obj.r;
// x();

let obj2 = {
a: 10,
b: 20,
c: x
}

obj2.c();
i m confused about this?what is this here

Read this: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.