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.
12
u/Content_Performer May 09 '20
TL:DR functions but 'this' actually works