Today we hit up higher-order functions, a feature of modern languages that will shorten up your code considerably. Once you know a few of these higher-order functions, you may never write loops again. Why? Because so much of our looping algorithms follow certain patterns, we can generalize those patterns into reusable functions. For the parts of the algorithms that differ, we take in functions from the callers are parameters.
We’ll be using these higher-order functions frequently when we build React apps, starting next week.
Here’s your TODO list:
reduce, or higher-order functions in general. This might be a question you really don’t know the answer to or one that you do know the answer to and are putting forward as a challenge to your peers.
See you next time.