0

I interested in ECMAScript explanation. I tried to find place in specification to understand how this works into arrow functions. How does the arrow function find "this"? But I didn't find. I need help.

P.S If you need in additional details, tell me.

MaximPro
  • 563
  • 8
  • 21
  • Have you tried searching at all? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions – Sergio Tulentsev Feb 05 '18 at 10:20
  • "No separate `this`. Until arrow functions, every new function defined its own `this` value". So `this` in the function should be the same as outside. – Sergio Tulentsev Feb 05 '18 at 10:21
  • Have you seen https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions and https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this ? Not that hard to find info about `this` in arrow functions. – xander Feb 05 '18 at 10:22
  • I was having the same question when I started with ES6. You will come to know exact explanation when you see it practically. Since arrow functions do not have their own this, the methods can only pass in parameters. – Nikhil Parmar Feb 05 '18 at 10:26
  • in an arrow function `this` is resolved like any other variable. – Felix Kling Feb 05 '18 at 14:43

0 Answers0