Members
isEmpty
Returns true/false if stack is empty
peek
Peek next element
size
Returns number of elements
Methods
clear()
Removes all the elements in the stack
pop() → {any}
Retrieves and remove next element
Returns:
element
- Type
- any
push(val)
Push a new value to the stack
Parameters:
Name | Type | Description |
---|---|---|
val |
any |
toArray() → {Array}
Converts and return an array from stack
Returns:
- Type
- Array