aboutsummaryrefslogtreecommitdiff
path: root/files/es/web/javascript/reference/global_objects/map/values/index.html
diff options
context:
space:
mode:
authorFlorian Merz <me@fiji-flo.de>2021-02-11 14:46:50 +0100
committerFlorian Merz <me@fiji-flo.de>2021-02-11 14:46:50 +0100
commita55b575e8089ee6cab7c5c262a7e6db55d0e34d6 (patch)
tree5032e6779a402a863654c9d65965073f09ea4182 /files/es/web/javascript/reference/global_objects/map/values/index.html
parent8260a606c143e6b55a467edf017a56bdcd6cba7e (diff)
downloadtranslated-content-a55b575e8089ee6cab7c5c262a7e6db55d0e34d6.tar.gz
translated-content-a55b575e8089ee6cab7c5c262a7e6db55d0e34d6.tar.bz2
translated-content-a55b575e8089ee6cab7c5c262a7e6db55d0e34d6.zip
unslug es: move
Diffstat (limited to 'files/es/web/javascript/reference/global_objects/map/values/index.html')
-rw-r--r--files/es/web/javascript/reference/global_objects/map/values/index.html77
1 files changed, 77 insertions, 0 deletions
diff --git a/files/es/web/javascript/reference/global_objects/map/values/index.html b/files/es/web/javascript/reference/global_objects/map/values/index.html
new file mode 100644
index 0000000000..c81b54dbe7
--- /dev/null
+++ b/files/es/web/javascript/reference/global_objects/map/values/index.html
@@ -0,0 +1,77 @@
+---
+title: Map.prototype.values()
+slug: Web/JavaScript/Referencia/Objetos_globales/Map/values
+tags:
+ - ECMAScript 2015
+ - Iterador
+ - JavaScript
+ - Map
+ - Prototipo
+ - metodo
+translation_of: Web/JavaScript/Reference/Global_Objects/Map/values
+---
+<div>{{JSRef}}</div>
+
+<p>El método <code><strong>values()</strong></code> devuelve un nuevo objeto <strong><a href="/es/docs/Web/JavaScript/Guide/Iterators_and_Generators">Iterador</a></strong> que contiene los valores para cada elemento en el objeto <code>Map</code> en el mismo orden de inserción.</p>
+
+<div>{{EmbedInteractiveExample("pages/js/map-prototype-values.html")}}</div>
+
+
+
+<h2 id="Sintaxis">Sintaxis</h2>
+
+<pre class="syntaxbox"><code><em>myMap</em>.values()</code></pre>
+
+<h3 id="Valor_devuelto">Valor devuelto</h3>
+
+<p>Un nuevo objeto iterador {{jsxref("Map")}}.</p>
+
+<h2 id="Ejemplos">Ejemplos</h2>
+
+<h3 id="Utilizando_values()">Utilizando <code>values()</code></h3>
+
+<pre class="brush:js">var myMap = new Map();
+myMap.set('0', 'foo');
+myMap.set(1, 'bar');
+myMap.set({}, 'baz');
+
+var mapIter = myMap.values();
+
+console.log(mapIter.next().value); // "foo"
+console.log(mapIter.next().value); // "bar"
+console.log(mapIter.next().value); // "baz"</pre>
+
+<h2 id="Especificaciones">Especificaciones</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Especificación</th>
+ <th scope="col">Estado</th>
+ <th scope="col">Comentario</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES2015', '#sec-map.prototype.values', 'Map.prototype.values')}}</td>
+ <td>{{Spec2('ES2015')}}</td>
+ <td>Definición inicial.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-map.prototype.values', 'Map.prototype.values')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilidad_en_navegadores">Compatibilidad en navegadores</h2>
+
+
+
+<p>{{Compat("javascript.builtins.Map.values")}}</p>
+
+<h2 id="Ver_también">Ver también</h2>
+
+<ul>
+ <li>{{jsxref("Map.prototype.entries()")}}</li>
+ <li>{{jsxref("Map.prototype.keys()")}}</li>
+</ul>