1let arr1 = [0, 1, 2];
2let arr2 = [3, 5, 7];
3let primes = arr1.concat(arr2);
4
5// > [0, 1, 2, 3, 5, 7]
1const array1 = ['a', 'b', 'c'];
2const array2 = ['d', 'e', 'f'];
3const array3 = [...array1, ...array2];
4
5console.log(array3);
6// expected output: Array ["a", "b", "c", "d", "e", "f"]
1var array1 = [1,2,3,4];
2var array2 = [5,-6,7,8.5];
3
4const concatArr = (arr1, arr2, sep) => arr1.map(function (num, idx) {
5 return num.toString().concat(sep,(arr2[idx]).toString())
6});
7
8console.log(concatArr(array1,array2,"#"))// ["1#5", "2#-6", "3#7", "4#8.5"]