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

Method add

utils/LinkedList.js:7–14  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

5 }
6
7 add(value) {
8 let currentNode = this;
9
10 while (currentNode !== null) {
11 currentNode = currentNode.next;
12 }
13 currentNode.next = new LinkedList(value);
14 }
15}
16
17module.exports = LinkedList;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected