Learn JavaScript
this on Objects
38.9
Lesson

Arrow function and this

Arrow functions do not have their own this. If we use this inside an arrow function, it takes the value from the outer regular function.

In the example given below, this inside arrowFunction takes the value from the outer admin.sayHello() method.