Using linked lists in javascript

Are there any ideas for using linked lists in javascript? Its main advantage over arrays (for example) is that we can insert an element with a random index without moving each element, and that they are not limited in size in the form of arrays.

However, arrays in JS are dynamically expanding, shrinking, and arrays get access to data faster. We can also use the method Array.prototype.splice()(indeed, linked lists can be even faster than this) to insert data.

Are there any advantages (speed, etc.) to using linked lists by arrays in JavaScript?

The code for basic linked lists using JS.

function list() {

  this.head = null;
  this.tail = null;

  this.createNode=function(data) {
    return {data: data, next: null }
  };

  this.addNode=function(data) {
    if (this.head == null) {
      this.tail = this.createNode(data);
      this.head = this.tail;
    } else {
      this.tail.next = this.createNode(data);
      this.tail = this.tail.next;
    }
  };

  this.printNode=function() {
    var x = this.head;
    while (x != null) {
      console.log(x.data);
      x = x.next;
    }
  }
}

var list = new list();
list.addNode("one");
list.addNode("two");
list.printNode();
+4
2

. , , , , Javascript . , : , ( ) , .

: ?

+1

, , - O (1), O (n). , , O (1) , O (n).

, , , , , .

wiki:

enter image description here

+3