code: function(vertex) {
        if (this.head === null) {
          this.head = vertex;
        } else {
          this.tail.next = vertex;
        }
  
        vertex.prev = this.tail;
        vertex.next = null; // the tail has no subsequent vertex
  
        this.tail = vertex;
  
        return this;
      }
docs: Appends a vertex to the end of the linked list