Skip to main content

Stack

Stack

Kind: global class

stack.on

Kind: instance property of Stack
Read only: true

stack.asArray() ⇒ Array.<T>

Kind: instance method of Stack

stack.isEmpty() ⇒ boolean

Kind: instance method of Stack

stack.remove(value) ⇒ boolean

Performs out-of-order removal

Kind: instance method of Stack

ParamType
valueT

stack.push(value)

Insert element at the top

Kind: instance method of Stack

ParamType
valueT

stack.pop() ⇒ T | undefined

Remove top element and return it

Kind: instance method of Stack

stack.peek() ⇒ T | undefined

Return top element without removing it

Kind: instance method of Stack

stack.clear()

Remove all elements from the stack

Kind: instance method of Stack