let intStack = [];
intStack.push(1);
intStack.push(3);
intStack.push(5);
let top = intStack.slice(-1)[0];
//top is 5
let first = intStack.pop();
//first is 5
let second = intStack.pop();
//second is 3
let third = intStack.pop();
//third is 1
console.log("top =", top);
console.log("first =", first);
console.log("second =", second);
console.log("third =", third);