Michael Iacono
Mar 16, 2021

--

Javascript Higher Order Functions

Functional programming languages need the ability to pass data through one function and into another. By treating functions as objects, JavaScript allows you to move that data around and through functions to do work. The two factors that make a JavaScript function “higher order” is either returning a function definition, or having one of the parameters of the function be another function that will then be invoked when the first function is called.

Lots of technical terms there and a good place to look is here: https://www.freecodecamp.org/news/a-quick-intro-to-higher-order-functions-in-javascript-1a014f89c6b/

The gist is that functions, just like any other “type” in JavaScript are data, and have the ability to act on data. As Yazeed says in his article, “pretty meta”.

--

--