From 9a597e84db347a19e62c21c97c94116851c4d414 Mon Sep 17 00:00:00 2001 From: egxn Date: Wed, 27 Feb 2019 13:27:19 -0500 Subject: [PATCH] Add a missing preposition (#24445) A little fix with, add a preposition like in the localeTitle --- ...-the-end-of-an-array-using-concat-instead-of-push.spanish.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curriculum/challenges/spanish/02-javascript-algorithms-and-data-structures/functional-programming/add-elements-to-the-end-of-an-array-using-concat-instead-of-push.spanish.md b/curriculum/challenges/spanish/02-javascript-algorithms-and-data-structures/functional-programming/add-elements-to-the-end-of-an-array-using-concat-instead-of-push.spanish.md index 89f47cbb7a..8b72838c38 100644 --- a/curriculum/challenges/spanish/02-javascript-algorithms-and-data-structures/functional-programming/add-elements-to-the-end-of-an-array-using-concat-instead-of-push.spanish.md +++ b/curriculum/challenges/spanish/02-javascript-algorithms-and-data-structures/functional-programming/add-elements-to-the-end-of-an-array-using-concat-instead-of-push.spanish.md @@ -10,7 +10,7 @@ localeTitle: Agregue elementos al final de una matriz usando concat en lugar de
La programación funcional tiene que ver con la creación y el uso de funciones no mutantes. El último desafío introdujo el método concat como una forma de combinar arreglos en uno nuevo sin mutar los arreglos originales. Comparar concat con el método de push . Push agrega un elemento al final de la misma matriz a la que se llama, lo que muta esa matriz. Aquí hay un ejemplo:
var arr = [1, 2, 3];
arr.push ([4, 5, 6]);
// arr se cambia a [1, 2, 3, [4, 5, 6]]
// No es la forma de programación funcional
Concat ofrece una forma de agregar nuevos elementos al final de una matriz sin efectos secundarios mutantes.
## Instructions -
Cambie la función nonMutatingPush para que use concat para agregar newItem al final del original lugar de push . La función debe devolver una matriz.
+
Cambie la función nonMutatingPush para que use concat para agregar newItem al final del original en lugar de push . La función debe devolver una matriz.
## Tests