const arr = [1, 2, 3, 4]

let len = arr.push(10)
console.log(arr) // [1,2,3,4,10]
console.log(len) // 5

let len2 = arr.push(20, 50)
console.log(arr) // [1,2,3,4,10,20,50]
console.log(len2) // 7


//2つの配列をマージする
let arr1 = ['red','blue','yellow'];
let arr2 = ['white','black'];

let len3 = Array.prototype.push.apply(arr1, arr2);

console.log(arr1); //["red","blue","yellow","white","black"]
console.log(len3); // 5

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.