The Map()
constructor creates Map
objects.
The Map()
constructor creates Map
objects.
const myMap = new Map([ [1, "one"], [2, "two"], [3, "three"], ]);
Specification |
---|
ECMAScript Language Specification # sec-map-constructor |
Desktop | Mobile | Server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | Deno | Node.js | ||
Map |
38 | 12 | 13 | 25 | 8 | 38 | 14 | 25 | 8 | 3.0 | 38 | 1.0 | 0.12.0 | |
iterable_allowed |
38 | 12 | 13 | 25 | 9 | 38 | 14 | 25 | 9 | 3.0 | 38 | 1.0 | 0.12.0 | |
new_required |
38 | 12 | 42 | 25 | 9 | 38 | 42 | 25 | 9 | 3.0 | 38 | 1.0 | 0.12.0 | |
null_allowed |
38 | 12 | 37 | 25 | 9 | 38 | 37 | 25 | 9 | 3.0 | 38 | 1.0 | 0.12.0 |
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/Map