Become a member
to unlock all features

    Arrow Functions and Lexical Scoping "this"


    Arrow functions came into existence with ES6. Since then they have been looked at as the fix all solution when running into problems with this in our code. However it might not magically work all the time and this lesson is designed to show you how it really resolves this. We first need to understand what lexical scope is. It references the author time of our code which can be confusing considering this is runtime dependant. Let's look at all three of these examples to figure out how arrow functions work with this.