# Map

*noun*

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

A JavaScript collection that stores values under keys of any type, keeps them in the order added, and looks them up quickly.

## What is **Map** in JavaScript?

**Map** — A collection that associates unique keys with values.

```javascript
const prices = new Map();
prices.set("tea", 3);
```

## In a sentence

- “A **Map** can use an object as a key, which a plain object can't.”
- “The cart keeps each item's quantity in a **Map**, keyed by product id.”

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

Updated: November 19, 2026

## In other subjects

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

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