A RetroSearch Logo

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

Search Query:

Showing content from http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/Map below:

Map() constructor - JavaScript | MDN

Map() constructor

Baseline Widely available

The Map() constructor creates Map objects.

Syntax
new Map()
new Map(iterable)

Note: Map() can only be constructed with new. Attempting to call it without new throws a TypeError.

Parameters
iterable Optional

An Array or other iterable object whose elements are key-value pairs. (For example, arrays with two elements, such as [[ 1, 'one' ],[ 2, 'two' ]].) Each key-value pair is added to the new Map.

Examples Creating a new Map
const myMap = new Map([
  [1, "one"],
  [2, "two"],
  [3, "three"],
]);
Specifications Browser compatibility See also

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