Map() constructor
The Map()
constructor creates Map
objects.
Syntax
Parameters
Examples
Creating a new Map
js
const myMap = new Map([
[1, "one"],
[2, "two"],
[3, "three"],
]);
Specifications
Specification |
---|
ECMAScript Language Specification # sec-map-constructor |
Browser compatibility
BCD tables only load in the browser