Stack
Stack
Kind: global class
- Stack
- .on
- .asArray() ⇒
Array.<T>
- .isEmpty() ⇒
boolean
- .remove(value) ⇒
boolean
- .push(value)
- .pop() ⇒
T
|undefined
- .peek() ⇒
T
|undefined
- .clear()
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
Param | Type |
---|---|
value | T |
stack.push(value)
Insert element at the top
Kind: instance method of Stack
Param | Type |
---|---|
value | T |
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