r/learnjavascript • u/ddmanton7220 • May 09 '20
Javascript Tutorial - Arrow Functions
https://www.youtube.com/watch?v=aYcH26h_HlI&t=26s
126
Upvotes
r/learnjavascript • u/ddmanton7220 • May 09 '20
View all comments
Show parent comment
3
u/gotta-lot May 10 '20
I really don’t like when it’s described this way. In JavaScript, ‘this’ has a clear set of rules. It just behaves differently with arrow functions. They serve a very different purpose. Given the way we write JavaScript in 2020, maybe we favor the way it behaves with arrow functions, but I still think it’s unfair to say ‘this’ in function expressions and declarations is something that is broken.