Constructeur Map()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Le constructeur Map()
permet de créer des objets Map
.
Syntaxe
js
new Map();
new Map(iterable);
Paramètres
Exemples
Créer un nouvel objet Map
js
let maMap = new Map([
[1, "un"],
[2, "deux"],
[3, "trois"],
]);
Spécifications
Specification |
---|
ECMAScript Language Specification # sec-map-constructor |
Compatibilité des navigateurs
BCD tables only load in the browser