With fat arrow syntax you can define functions shorter than a function expression. There are cases when you can completely omit:

  • parameters parentheses (param1, param2)
  • return keyword
  • or even curly braces { }.

Let’s explore how to make arrow functions concise and straightforward to read. Plus you’ll find some tricky shortening cases to be aware of.

#javascript #js

How to shorten arrow functions in JavaScript to increase the readability of your code
2.35 GEEK