You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cuando necesitamos iterar sobre un array -- podemos usar `forEach`, `for`or`for..of`.
540
+
Cuando necesitamos iterar sobre un array podemos usar `forEach`, `for`o`for..of`.
541
541
542
-
Cuando necesitamos iterar y devolver un valor por cada elemento -- podemos usar `map`.
542
+
Cuando necesitamos iterar y devolver un valor por cada elemento podemos usar `map`.
543
543
544
544
Los métodos [arr.reduce](https://developer.mozilla.org/es/docs/Web/JavaScript/Referencia/Objetos_globales/Array/reduce) y [arr.reduceRight](https://developer.mozilla.org/es/docs/Web/JavaScript/Referencia/Objetos_globales/Array/reduceRight) también pertenecen a ese grupo de acciones pero son un poco más complejos. Se los utiliza para calcular un único valor a partir del array.
0 commit comments