MCPcopy Index your code
hub / github.com/careercup/CtCI-6th-Edition-JavaScript / peek

Method peek

chapter03/util/Stack.js:33–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31 }
32
33 peek() {
34 if (this.isEmpty()) return null;
35 return this._data[this.size() - 1];
36 }
37
38 _toArray() {
39 return this._data;

Callers

nothing calls this directly

Calls 2

isEmptyMethod · 0.95
sizeMethod · 0.95

Tested by

no test coverage detected