In JavaScript, functions are first-class objects. This means that functions can take functions as arguments, and they can return functions. A function that does either of these things is called a higher-order function.