MCPcopy Create free account
hub / github.com/btholt/algorithms-exercises / constructor

Method constructor

specs/arrays/arraylist.solution.test.js:21–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19
20class ArrayList {
21 constructor() {
22 this.length = 0;
23 this.data = {};
24 }
25 push(value) {
26 this.data[this.length] = value;
27 this.length++;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected