Arrow functions are more (and less) than just a shorthand to anonymous functions; which make then useful in particular cases. They preserve the context of this, which solves some really confusing scoping issues that previously required closures or bind(this).
There's some discussion of this in the MDN docs
The way I understand things is in relation to other things: Analogy: what can it be compared to? Absence: what would we have to do without it? Example: how does it work?
Arrow functions are more (and less) than just a shorthand to anonymous functions; which make then useful in particular cases. They preserve the context of
this
, which solves some really confusing scoping issues that previously required closures orbind(this)
.There's some discussion of this in the MDN docs
Great point, thanks!
Very good answer