Link List
Data-Structure | Linear Category Link List - Code Example Single, Doubly, Circular class Node { constructor(data) { this.data = data; // single this.next = null; // Doubly //this.previous = null; } } // ############################################# // ############################################# class LinkList { // main --> starting point... // & this should be a Node constructor(head) { this.head = head; this.size = 1; } add(data) { const newNode = new Node(data); let currentNode = this.head; // checking until - null area not found... while (currentNode.next != null) { currentNode = currentNode.next; } currentNode.next = newNode; this.size++; } } // ######################################################## // ######################################################## // #########################