Let’s review what we learned in this lesson:
Abstraction allows us to write complicated code in a way that’s easy to reuse, debug, and understand for human readers.
We can work with functions the same way we work with any other type of data, including reassigning them to new variables.
Functions can be passed into other functions as parameters.
A higher-order function is a function that either accepts functions as parameters, returns a function, or both.
Feel free to play around with the code in the workspace.
- What happens if you change the value of
- Which variable holds the callback function?
- What happens if you invoke the function’s argument?