A RetroSearch Logo

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

Search Query:

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

Map() constructor - JavaScript | MDN

Map() constructor

Baseline Widely available

El constructor Map() crea objetos de tipo Map.

Sintaxis
new Map()
new Map(iterable)

Nota: Map() sólo puede ser construido con la palabra clave new. Intentar llamaro sin la palabra clave new arroja un TypeError.

Parametros
iterable Opcional

Un objeto Array u otro objeto iterable cuyos elementos sean tuplas llave-valor. (Por ejemplo, arreglos con dos elementos, tales como [[ 1, 'one' ],[ 2, 'two' ]].) Cada tupla llave-valor es agregada al nuevo objeto Map.

Ejemplos Creando un nuevo objeto Map
const myMap = new Map([
  [1, "one"],
  [2, "two"],
  [3, "three"],
]);
Especificaciones Compatibilidad con navegadores Véase también

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