Higher-Order Function
Definition
A function that either takes one or more functions as arguments, returns a function, or both. Common examples include `map`, `filter`, `reduce`, and `forEach`.
Code Example
Javascript
Tip: Modify the code above and click “Run” to see the results
Learn More
Related Terms
Closure
A function that retains access to variables from its outer (enclosing) scope even after the outer function has returned. Closures are created every time a function is created in JavaScript.
CallbackA function passed as an argument to another function, to be executed later. Callbacks are the foundation of asynchronous JavaScript and are used extensively in event handling and array methods.
Arrow FunctionA compact function syntax introduced in ES6. Arrow functions do not have their own this, arguments, or super bindings, making them ideal for callbacks and methods that need to preserve the outer this context.