# Higher-Order Function

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

A function that takes another function as a value, or hands one back.

## What is a **higher-order function**?

A **higher-order function** takes another function as a value, or returns one. A checkout that's handed this week's deal as a function, and calls it to work out the discount, is one; so is `sort` when you hand it a function that compares two items.

```javascript
function checkout(order, deal) {
  return order.subtotal - deal(order);
}
```

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

Updated: November 17, 2026

## In other subjects

- [Higher-Order Function in JavaScript](https://www.ask-codey.com/glossary/higher-order-function-javascript)
- [Higher-Order Function in Python](https://www.ask-codey.com/glossary/higher-order-function)

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