# map()

*noun*

say it: **“MAP”** **/mæp/**

The JavaScript array method that turns each item into something else, giving a new array.

## What does **map()** do in JavaScript?

**map()** — An Array method that creates a new array by transforming every item.

```javascript
const prices = [2, 3, 4];
const doubled = prices.map(price => price * 2);
```

## In a sentence

- “products.**map**(p => p.name) gave an array of just the names.”

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

- [map() in Java](https://www.ask-codey.com/glossary/map-java-2)
- [map() in Python](https://www.ask-codey.com/glossary/map)

Source: https://www.ask-codey.com/glossary/map-javascript
