MCPcopy Create free account
hub / github.com/TodePond/ScreenPond / constructor

Method constructor

source/list.js:5–13  ·  view source on GitHub ↗
(iterable = [])

Source from the content-addressed store, hash-verified

3//======//
4export class LinkedList {
5 constructor(iterable = []) {
6 this.start = undefined;
7 this.end = undefined;
8 this.isEmpty = true;
9
10 for (const item of iterable) {
11 this.push(item);
12 }
13 }
14
15 *[Symbol.iterator]() {
16 let link = this.start;

Callers

nothing calls this directly

Calls 1

pushMethod · 0.95

Tested by

no test coverage detected