mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-16 09:07:41 -05:00
603 B
603 B
title, localeTitle
| title | localeTitle |
|---|---|
| Combine Two Arrays Using the concat Method | Combina dos matrices usando el método concat |
Combina dos matrices usando el método concat
- El método concat se utiliza para unir dos o más matrices o cadenas.
- Este método no muta las matrices existentes, pero devuelve una nueva matriz.
Solución
function nonMutatingConcat(original, attach) {
// Add your code below this line
return original.concat(attach);
// Add your code above this line
}
var first = [1, 2, 3];
var second = [4, 5];
nonMutatingConcat(first, second);