Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/trekhleb/javascript-algorithms
/ isEmpty
Method
isEmpty
src/data-structures/stack/Stack.js:14–17 ·
view source on GitHub ↗
* @return {boolean}
()
Source
from the content-addressed store, hash-verified
12
* @
return
{boolean}
13
*/
14
isEmpty() {
15
// The stack is empty if its linked list doesn't have a head.
16
return
!this.linkedList.head;
17
}
18
19
/**
20
* @
return
{*}
Callers
3
peek
Method · 0.95
isValid
Function · 0.95
Stack.test.js
File · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected