if array1 = [1, 2, 3, 4];
then array2 = [5, 6, 7];
In the end i want all these values to be in one array as
array3 = [1, 2, 3, 4, 5, 6, 7]
if array1 = [1, 2, 3, 4];
then array2 = [5, 6, 7];
In the end i want all these values to be in one array as
array3 = [1, 2, 3, 4, 5, 6, 7]
You can use concat method like this
let array1 = [1, 2, 3, 4];
let array2 = [5, 6, 7];
let array3 = array1.concat(array2);
console.log(array3)