Design Patterns · Middle · Question 43 of 75
What is a higher-order function in terms of patterns?
- ✓Correct answer: A function that takes or returns a function
- 2A function that runs before all others on startup
- 3The function with the most calls in the profiler
Explanation
map, filter, debounce, memoize and HOCs are all higher-order functions. In JS, many classic patterns are expressed this way, without classes or hierarchies.