Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Map.prototype.entries()

This article needs an editorial review. How you can help.

This is a new technology, part of the ECMAScript 2015 (ES6) standard.
This technology's specification has been finalized, but check the compatibility table for usage and implementation status in various browsers.

El mètode entries()retorna un nou objecte Iterator que conté la parella [clau, valor] per cadascun dels elements de l'objecte Map en l'ordre d'inserció.

Sintaxi

myMap.entries()

Exemples

Utilitzar entries()

var myMap = new Map();
myMap.set("0", "foo");
myMap.set(1, "bar");
myMap.set({}, "baz");

var mapIter = myMap.entries();

console.log(mapIter.next().value); // ["0", "foo"]
console.log(mapIter.next().value); // [1, "bar"]
console.log(mapIter.next().value); // [Object, "baz"]

Especificacions

Especificació Estat Comentaris
ECMAScript 2015 (6th Edition, ECMA-262)
The definition of 'Map.prototype.entries' in that specification.
Standard Definició inicial.

Compatibilitat amb navegadors

Característica Chrome Firefox (Gecko) Internet Explorer Opera Safari
Suport bàsic 38 20 (20) Not supported 25 7.1
Característica Android Chrome per Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Suport bàsic Not supported 38 20.0 (20) Not supported Not supported 8

Vegeu també

Document Tags and Contributors

 Contributors to this page: llue
 Last updated by: llue,