Class: Stack

Stack()

A class that represents a stack. When an item is added, it goes to the top. When an item is removed, it is removed from the top.

Constructor

new Stack()

Source:

Members

items

The number of items in the stack.

Source:

Methods

add(…items) → {undefined}

Add an item to the stack.

Parameters:
Name Type Attributes Description
items * <repeatable>

The items to add.

Source:
Returns:
Type
undefined

remove() → {*}

Remove an item from the stack.

Source:
Returns:

The item.

Type
*