var a = []; a.push(1); a.push(2); // 배열의 첫 번째 원소를 반환 후 제거한다. console.log(a.shift()); console.log(a);