True if stack is empty
True if stack is at its capacity. False if not, or if there is no capacity.
Number of items in stack
Get the item at the top of the stack without removing it (like pop
would do)
Item at the top of the stack, or undefined if empty.
Stack (immutable)
Example: Overview
Example
Stack can also be created from the basis of an existing array. First index of array will be the bottom of the stack. Stack