Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/StephenGrider/AlgoCasts
/ constructor
Method
constructor
exercises/levelwidth/node.js:2–5 ·
view source on GitHub ↗
(data)
Source
from the content-addressed store, hash-verified
1
module.exports =
class
Node {
2
constructor(data) {
3
this.data = data;
4
this.children = [];
5
}
6
7
add(data) {
8
this.children.push(
new
Node(data));
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected