# First-Class Function

*noun*

say it: **“FURST klass FUNK-shun”** **/fɜːrst klæs ˈfʌŋkʃən/**

The idea that in JavaScript a function is a value like any other: you can keep it in a variable, pass it to another function, or return it from one.

## What is **First-Class Function** in JavaScript?

**First-Class Function** — A language has first-class functions when a function is a value like any other: you can keep it in a variable, pass it to another function, or return it from one. JavaScript does, and that's what makes callbacks and `map()` work.

```javascript
const shout = (name) => name.toUpperCase();
const tidyName = shout; // the same function, in another variable
console.log(['Rae', 'Max'].map(tidyName)); // [ 'RAE', 'MAX' ]
```

## In a sentence

- “Because JavaScript has **first-class functions**, I could store the greet function in a variable and pass it to a button.”

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

- [First-Class Function in Software Development](https://www.ask-codey.com/glossary/first-class-function-software-development)

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