8.2.1 배열의 처음이나 끝에서 요소 하나를 추가하거나 제거하기
배열의 처음
배열의 끝
push
pop
shift
unshift
const arr = ["b", "c", "d"];
arr.push("e"); // ["b", "c", "d", "e"]
arr.pop(); // ["b", "c", "d"]
arr.unshift("a"); // ["a", "b", "c", "d"];
arr.shift(); // ["b", "c", "d"]Last updated