Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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
peek
Method · 0.45
Calls
2
isEmpty
Method · 0.95
size
Method · 0.95
Tested by
no test coverage detected