The "this" Keyword: Predictable or a Trap? 🧐 Most devs think they understand this, until it returns undefined. Can you guess the output of this simple object? const obj = { a: 10, f: function () { return this.a; }, }; console.log(obj.f()); The answer seems easy... but do you know what happens to this if we change that function to an Arrow Function? 🤯 In my latest video, I break down exactly how execution context works so you never have to guess again. #JavaScript #WebDev #CodingTips #SoftwareEngineering #Programming

To view or add a comment, sign in

Explore content categories