Course lesson
Modify Functions with Higher Order Functions in JavaScript
This lesson teaches the concept of higher order functions (HOF) in JavaScript, a necessary building block of functional programming in any language.
- Duration
- 1 min
- Access
- Pro
- Transcript
- Available
This lesson teaches the concept of higher order functions (HOF) in JavaScript, a necessary building block of functional programming in any language.
A higher order function does at least one of the following things, often both:
- Accepts a function as an argument
- Returns a new function
To demonstrate this, we will build a higher order function, withCount(), that modifies any function passed to it so that it logs out how many times it has been called.