Standard built-ins
Map
Ordered key–value collection; arbitrary values can be keys, with SameValueZero comparisons. Constructor accepts iterable pairs.
Formal Syntax & Structure
javascript syntaxjavascript
new Map([iterable])Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| iterable | Iterable | Optional initial elements or entries. |
Return Value
Map
New map.
Working Example
Example Snippetjavascript
console.log(new Map([["x",1]]).get("x"));