var myarray = ["item 1", "item 2", "item 3", "item 4"];
//removes the first element of the array, and returns that element.
alert(myarray.shift());
//alerts "item 1"
//removes the last element of the array, and returns that element.
alert(myarray.pop());
//alerts "item 4"
- 첫 번째 배열을 제거하고 첫 번째 요소를 뺀 배열을 반환하는 방법
 - 내 예에서는 
"item 2", "item 3", "item 4"첫 번째 요소를 제거 해야합니다. 
답변
답변
ES6를 사용하지 않는 이유는 무엇입니까?
 var myarray = ["item 1", "item 2", "item 3", "item 4"];
 const [, ...rest] = myarray;
 console.log(rest)
답변
이 시도
    var myarray = ["item 1", "item 2", "item 3", "item 4"];
    //removes the first element of the array, and returns that element apart from item 1.
    myarray.shift();
    console.log(myarray);
