constructor(
    iterable = [],
    // end::constructor[]
    ListNode = Node, // Node class (e.g. singly, doubly, multilevel)
    // tag::constructor[]
  ) {
    this.first = null; // head/root element
    this.last = null; // last element of the list
    this.size = 0; // total number of elements in the list
    // end::constructor[]
    this.ListNode = ListNode; // ListNode class
    // tag::constructor[]

    Array.from(iterable, (i) => this.addLast(i));
  }
Doubly linked list that keeps track of
the last and first element