Map() constructor
The Map() constructor creates Map objects.
Syntax
new Map()
new Map(iterable)
Parameters
Examples
Creating a new Map
let 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