# Higher-Order Function

*noun*

say it: **“HY-er OR-der FUNK-shun”** **/ˈhaɪər ˈɔːrdər ˈfʌŋkʃən/** or **“HY-er OR-der FUNGK-shun”** **/ˈhaɪər ˈɔːrdər ˈfʌŋkʃən/**

A function that takes another function as an input or hands one back as its result, such as map, filter or a function that builds counters.

## What is **Higher-Order Function** in JavaScript?

**Higher-Order Function** — A function that takes or returns another function.

```javascript
function applyDiscount(price, discount) {
    return discount(price);
}
```

## In a sentence

- “filter() is a **higher-order function**: I hand it a function that decides which pets to keep.”
- “filter is a **higher-order function**: I hand it a small function that says which songs to keep.”

Level: Journeyman · [More JavaScript terms at this level](https://www.ask-codey.com/glossary?category=javascript&level=3)

Updated: November 9, 2026

## In other subjects

- [Higher-Order Function in Python](https://www.ask-codey.com/glossary/higher-order-function)
- [Higher-Order Function in Software Development](https://www.ask-codey.com/glossary/higher-order-function-software-development)

Source: https://www.ask-codey.com/glossary/higher-order-function-javascript
