Stack

var stk = Stack() // create a new stack
stk.push(1) // push
stk.push(2)
stk.push(3)
stk.push(5)
stk.push(9)

var x = stk.pop() // pop returns the poped element

console.log(stk.isEmpty()); // true if there are no elements in the stack
console.log(stk.peek()); // displays the top of the stack