Appearance
Inserts an object at the top of the Stack<T>.
Stack<T>
valueT: The object to push onto the Stack<T>.
T
const stack = new Stack<number>(); stack.push(1); stack.push(2); stack.push(3); stack.length // => 3
This method is an O(1) operation.