关于数组的合并arr.push() arr.push.apply()
arr=[1,2]; arr1=[3,4]; arr3=arr.push(arr1); console.log(arr); console.log(arr1); console.log(arr3);
result:
[1,2,[3,4]]
[3,4]
3
arr=[1,2]; arr1=[3,4]; arr3=arr.push.apply(arr,arr1); console.log(arr); console.log(arr1); console.log(arr3)
result:
[1,2,3,4]
[3,4]
4
╰︶﹉⋛⋋⊱⋋๑๑⋌⊰⋌⋚﹉︶╯