Arrays and collections

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 is", top)
console.log("first is", first)
console.log("second is", second)
console.log("third is", third)