JSFiddle - React, Tailwind, and code Playground

by Eugen Sunic

JavaScript

class DoublyNode {
  constructor(data) {
    this.data = data;
    this.next = null;
    this.previous = null;
  }
}

class DoublyLinkedList {
  constructor() {
    this.head = null;
    this.tail = null;
  }

  add(value) {}

}

const dll = new DoublyLinkedList();
dll.add(1);
dll.add(2)
console.log(dll)