More than 1 year has passed since last update.

メモ

var array1 = [1, 2, 3];
var array2 = [4, 5, 6];


//結合
var newArray = array1.concat(array2);

console.log(newArray);
=>[1, 2, 3, 4, 5, 6]

console.log(array1);
=>[1, 2, 3]


//破壊的結合
var ArrayLength = Array.prototype.push.apply(array1, array2);

console.log(ArrayLength)
=> 6

console.log(array1);
=> [1, 2, 3, 4, 5, 6]


Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account log in.