Higher Order Functions

Let's understand the concept of High-Order functions and see their uses in JavaScript.

Throughout this chapter, we have leveraged the fact that JavaScript functions can be passed around just like any other value. We say that functions are first-class citizens in JavaScript, which means that they are treated equally to other types.

Thanks to their first-class citizenry, functions can be combined together, rendering programs even more expressive and enabling a truly functional programming style. A function that takes another function as a parameter or returns another function is called a higher-order function. Check out this final version of our example program.

Get hands-on with 1200+ tech skills courses.