# Callback Function

*noun*

say it: **“KAWL-bak FUNGK-shun”** **/ˈkɔːlbæk ˈfʌŋkʃən/**

A function you pass to other code, to be called later, such as when a click happens.

## What is **Callback Function** in JavaScript?

**Callback Function** — A function passed to other code to be called later or during an operation.

```javascript
function greet(name) {
    return `Hello, ${name}`;
}

const names = ["Ada", "Lin"];
const greetings = names.map(greet);
```

## In a sentence

- “The **callback** runs each time the button is clicked.”

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

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/callback-function
