MCPcopy Create free account
hub / github.com/betomoedano/JavaScript-Coding-Interview-Questions / constructor

Method constructor

stacks/min-stack.js:2–6  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1class MinStack {
2 constructor() {
3 this.elements = [];
4 this.mins = [];
5 this.min = undefined;
6 }
7
8 push(element) {
9 this.elements.push(element);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected