Hacker News new | ask | show | jobs
by azorba1987 3108 days ago
Some snippets, like this, read a lot like codegolf functions.
1 comments

Code Golf is about using the most terse syntax (and frankly, showing off while doing it).

This was a new syntax added to the language spec to reduce the amount of boilerplate required for common tasks.

Also, the "fat arrow function" handles "this" different inside of the function, so it can serve a slightly different function and in many event-handling cases it can be even more terse than traditional JS functions.