# WeakMap

A Map-like collection with weakly held object or non-registered Symbol keys.

## What is **WeakMap** in JavaScript?

**WeakMap** — A Map-like collection with weakly held object or non-registered Symbol keys.

```javascript
const metadata = new WeakMap();
metadata.set(order, { cached: true });
```

Level: Freelancer · [More JavaScript terms at this level](https://www.ask-codey.com/glossary/subjects/javascript/freelancer)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/weakmap
