April 2018
Intermediate to advanced
284 pages
5h 46m
English
| Tip 33 | Reduce Complexity with Arrow Functions |
In this tip, you’ll learn how to use arrow functions to destructure arguments, return objects, and construct higher-order functions.
You explored arrow functions once in Tip 20, Simplify Looping with Arrow Functions . It’s time to take a deeper dive.
As a reminder, arrow functions allow you to remove extraneous information, such as the function declaration, parentheses, return statements, even curly braces. Now you’re going to see how to handle a few more concepts that you’ve just learned, such as destructuring. You’ll also get an introduction to new ideas that you’ll explore further in future tips.
Let’s begin with destructuring. You’re going to take an object that has a first and last name ...
Read now
Unlock full access