JS 배열 다루기: 원본을 변경하는 메서드 (Destructive)
원본 배열을 변경하는 메서드들 push() 배열의 끝에 하나 이상의 요소를 추가하고, 변경된 배열의 길이를 반환합니다. const fruits = ['apple', 'banana']; fruits.push('orange'); // ['apple', 'banana', 'orange'] pop() 배열의 마지막 요소를 제거하고, 그 요소를 반환합니다. const fruits = ['apple', 'banana', 'orange']; const lastFruit = fruits.pop(); // 'orange', fruits = ['apple', 'banana'] shift() 배열의 첫 번째 요소를 제거하고, 그 요소를 반환합니다. const fruits = ['apple', 'banana']; const ..