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)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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)