From db6d24556ab7579d02ce7b1c6e8658095e5d3136 Mon Sep 17 00:00:00 2001 From: hmizz Date: Mon, 27 Apr 2020 00:20:00 +0100 Subject: [PATCH] add-doublylinkedlist --- Data Structures/Linked List/DoublyLinkedList.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Data Structures/Linked List/DoublyLinkedList.js b/Data Structures/Linked List/DoublyLinkedList.js index 00931a2d7..aca5b7eb7 100644 --- a/Data Structures/Linked List/DoublyLinkedList.js +++ b/Data Structures/Linked List/DoublyLinkedList.js @@ -12,9 +12,7 @@ function doubleLinkedList() { //Add new element this.append = function(element) { - let node = new Node(element), - current = head, - previous; + let node = new Node(element); if(!head){ head = node;