3 ms·
> Arrow functions are more compact and have shorter syntax than function expression, and it utilises =>, that looks like a fat arrow. It's probably worth notin
by TechRomancer 8y ago
> Arrow functions are more compact and have shorter syntax than function expression, and it utilises =>, that looks like a fat arrow.
It's probably worth noting that the arrow syntax isn't just shorthand, it also maintains `this` from the outer scope. (or rather, doesn't define its own)
MDN has an excellent write up on the nuances: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...