DEV Community

Discussion on: Understanding This, Bind, Call, and Apply in JavaScript

Collapse
 
beernutz profile image
beernutz • Edited

Great article, thank you!

I wonder if it is worth explicitly pointing out in the "fat arrow" example, that the "arrowFunction" call to "this" could be pointing at global scope "this".

That alone seems like a good argument for avoiding the use of "this" entirely, as it feels like it violates the "Principal of Least Surprise".

(sorry for all the quotes, just seemed to make sense)