The concat() method of an array is used to merge two or more arrays.
const numbers = [1, 2, 3];
const numbers1 = [4, 5, 6];
const numbers2 = numbers.concat(numbers1);
console.log(numbers2);
// [1, 2, 3, 4, 5, 6]
The concat() method of an array is used to merge two or more arrays.
const numbers = [1, 2, 3];
const numbers1 = [4, 5, 6];
const numbers2 = numbers.concat(numbers1);
console.log(numbers2);
// [1, 2, 3, 4, 5, 6]