Массивы и коллекции

let intQueue = [];
intQueue.push(1);
intQueue.push(3);
intQueue.push(5);

let top = intQueue[0];
//top is 1
let first = intQueue.shift();
//first is 1
let second = intQueue.shift();
//second is 3
let third = intQueue.shift();
//third is 5

console.log("top =", top);
console.log("first =", first);
console.log("second =", second);
console.log("third =", third);