Arrow Functions: Lexical ‘this’ keyword
Maybe the biggest advantage of using arrow function is that they share the surrounding this keyword, this means unlike normal functions, arrow functions don’t get their own ‘this’ keyword.
Again,
Arrow functions don’t have ‘this’ keyword, they simply use the ‘this’ keyword of the function they are written in.
So we say, they have a lexical ‘this’ variable.
Continue reading →