MCPcopy Index your code
hub / github.com/betomoedano/JavaScript-Coding-Interview-Questions / peek

Method peek

stacks/queue-via-stacks.js:55–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53 return this.data.pop();
54 }
55 peek() {
56 if (this.isEmpty()) return null;
57 return this.data[this.size() - 1];
58 }
59}

Callers 1

peekMethod · 0.45

Calls 2

isEmptyMethod · 0.95
sizeMethod · 0.95

Tested by

no test coverage detected