Skip to main content

Stack

Create a Stack.

Usage

src/sample/stack.ts
import { Stack } from 'athro';

let stack = new Stack();

Available Methods

Methods available for Stack.

MethodsDescriptionSyntax
pushAdd item to the stackstack.push(value)
popRemove item from the stackstack.pop()
topGet the item from the top of the stackstack.top()
isEmptyCheck if the stack is emptystack.isEmpty()
getSizeGet size of the stackstack.getSize()