var arr1 = new int[]{1,2,3,4,5,6};
var arr2 = new int[]{7,8,9,0};
var joinedArray = arr1.Concat(arr2);
var array1 = ["Vijendra", "Singh"];
var array2 = ["Singh", "Shakya"];
console.log(array1.concat(array2));
const array1 = ["Vijendra","Singh"];
const array2 = ["Singh", "Shakya"];
const array3 = [...array1, ...array2];
const array1 = ["Vijendra","Singh"];
const array2 = ["Singh", "Shakya"];
const array3 = [...array1, ...array2];
// [ "Vijendra", "Singh", "Singh", "Shakya" ]
[1,2,3].concat([4,5,6])
// [1,2,3,4,5,6]
$users = User::all();
$associates = Associate::all();
$userAndAssociate = $users->concat($associates);
$users = User::all();
$associates = Associate::all();
$userAndAssociate = $users->concat($associates);
//for ES5
var array1 = ["Rahul", "Sachin"];
var array2 = ["Sehwag", "Kohli"];
var output = array1.concat(array2);
console.log(output);
//for ES6, we use spread operators to concat arrays
var array1 = ["Dravid", "Tendulkar"];
var array2 = ["Virendra", "Virat"];
concate two array
Join multiple arrays into one array