A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Global_Objects/Map/Map below:

Constructeur Map() - JavaScript | MDN

Constructeur Map()

Baseline Widely available

Le constructeur Map() permet de créer des objets Map.

Syntaxe
new Map();
new Map(iterable);
Paramètres
iterable Facultatif

Un tableau (Array) ou un autre objet itérable dont les éléments sont des clés/valeurs (par exemple des tableaux avec deux éléments comme [[ 1, 'un' ],[ 2, 'deux' ]]). Chaque paire de clé/valeur est ajouté au nouvel objet Map.

Exemples Créer un nouvel objet Map
let maMap = new Map([
  [1, "un"],
  [2, "deux"],
  [3, "trois"],
]);
Spécifications Compatibilité des navigateurs Voir aussi

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4