mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-12-19 06:58:15 +08:00
add-doublylinkedlist
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user