MCPcopy Create free account
hub / github.com/AlreadyBored/basic-js-ds / Stack

Class Stack

src/stack.js:15–30  ·  view source on GitHub ↗

* Implement the Stack with a given interface via array. * * @example * const stack = new Stack(); * * stack.push(1); // adds the element to the stack * stack.peek(); // returns the peek, but doesn't delete it, returns 1 * stack.pop(); // returns the top element from stack and deletes it, retu

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected