The type of elements stored in the stack
Removes and returns the top item from the stack.
The removed item, or undefined if the stack is empty
Returns the top item without removing it from the stack.
The top item, or undefined if the stack is empty
Removes the last occurrence of a specific element from the stack.
The element to remove
Number of elements to delete (default: 1)
True if the element was found and removed, false otherwise
Checks if the stack is empty.
True if the stack contains no items, false otherwise
Returns the number of items in the stack.
The count of items currently in the stack
Removes all items from the stack.
Generic stack data structure implementation with LIFO (Last In, First Out) behavior.