From a55b575e8089ee6cab7c5c262a7e6db55d0e34d6 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:46:50 +0100 Subject: unslug es: move --- .../global_objects/map/entries/index.html | 109 +++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 files/es/web/javascript/reference/global_objects/map/entries/index.html (limited to 'files/es/web/javascript/reference/global_objects/map/entries/index.html') diff --git a/files/es/web/javascript/reference/global_objects/map/entries/index.html b/files/es/web/javascript/reference/global_objects/map/entries/index.html new file mode 100644 index 0000000000..76a4ca10b7 --- /dev/null +++ b/files/es/web/javascript/reference/global_objects/map/entries/index.html @@ -0,0 +1,109 @@ +--- +title: Map.prototype.entries() +slug: Web/JavaScript/Referencia/Objetos_globales/Map/entries +translation_of: Web/JavaScript/Reference/Global_Objects/Map/entries +--- +
{{JSRef}}
+ +

El método entries() retorna un nuevo objeto Iterator que contiene los pares [clave, valor] para cada elemento en el objeto Map en orden de inserción.

+ +

Sintaxis

+ +
myMap.entries()
+ +

Ejemplos

+ +

Usando 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"]
+
+ +

Especificaciones

+ + + + + + + + + + + + + + + + + + + +
EspecificaciónEstadoObservaciones
{{SpecName('ES6', '#sec-map.prototype.entries', 'Map.prototype.entries')}}{{Spec2('ES6')}}Definición
{{SpecName('ESDraft', '#sec-map.prototype.entries', 'Map.prototype.entries')}}{{Spec2('ESDraft')}} 
+ +

Compatibilidad con navegadores

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
PrestaciónChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support38{{ CompatGeckoDesktop("20") }}{{CompatNo}}257.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
PrestaciónAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Soporte básico.{{CompatNo}}38{{CompatGeckoMobile("20")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Ver también

+ + -- cgit v1.2.3-54-g00ecf