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

Method push

stacks/queue-via-stacks.js:11–14  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

9 }
10
11 push(x) {
12 /* Push into stackNewest; wich always has the newes elements on top */
13 this.stackNewest.push(x);
14 }
15
16 /* muve elements from stackNewest into stackOldest. This is usually done so that
17 we can do operations on stackOldest. */

Callers

nothing calls this directly

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected