Saying that arrow function "binds to the parent scope" is just plain wrong and misleading. If you refer to MDN page, you will immediately see that arrow functions don't bind to ANYTHING ("Does not have its own bindings to this or super, and should not be used as methods") - which also tells you specifically not to use them as methods.
Understanding "this" is very important for writing proper JS, but I don't see the point of this article while knowing the exact same thing is stated in the doc (with less confusing wording).
Saying that arrow function "binds to the parent scope" is just plain wrong and misleading. If you refer to MDN page, you will immediately see that arrow functions don't bind to ANYTHING ("Does not have its own bindings to this or super, and should not be used as methods") - which also tells you specifically not to use them as methods.
Understanding "this" is very important for writing proper JS, but I don't see the point of this article while knowing the exact same thing is stated in the doc (with less confusing wording).
developer.mozilla.org/en-US/docs/W...
Not wrong or misleading at all. As stated: "The really important takeaway here is that arrow functions do not have their own this."
On MDN
"because Arrow functions establish "this" based on the scope the Arrow function is defined within."
developer.mozilla.org/en-US/docs/W...