1 // SPREAD OPERATOR
2 const list1 = ["pepe", "luis", "rua"];
3 const list2 = ["rojo", "verde", "azul"];
4 const newList = [...list1, ...list2];
5 // ["pepe", "luis", "rua", "rojo", "verde", "azul"]
1// To merge two or more arrays you shuld use concat() method.
2
3const array1 = ['a', 'b', 'c'];
4const array2 = ['d', 'e', 'f'];
5const array3 = array1.concat(array2);
6
7console.log(array3);
8// expected output: Array ["a", "b", "c", "d", "e", "f"]