The this
keyword, again!
Be careful when you use this
in nested functions!
class MyClass { constructor() { this.value = 10; } myMethod1() { return function () { console.log(this); }; } myMethod2() { return () => { console.log(this); }; } } const obj = new MyClass(); obj.myMethod1()(); obj.myMethod2()();