var arr1=[1,2,3]
var arr2=[4,5,6]
Array.prototype.push.apply(arr1, arr2);
arr1 // [1, 2, 3, 4, 5, 6]
var newArr=arr1.concat(arr2)
newArr = [1, 2, 3, 4, 5, 6]
function f(x, y, z) {
console.log(arguments)
}
var args = [0, 1, 2];
f.apply(null, args);
var args=[1,2,3]
function f(x,y,z){
console.log(arguments)
}
f(...args)