Index 0: Reference to the list that owns this node (undefined after removal)
Index 1: The immutable value stored in this node
Index 2: Reference to the previous node, or undefined if this is the first node
Index 3: Reference to the next node, or undefined if this is the last node
Example: Traversing nodes with index access for best performance
constlist = newDoubleLinkedList('a', 'b', 'c'); letnode = list.getHead(); while (node) { console.log(getNodeValue(node)); // 'a', 'b', 'c' - access value at index 1 node = getNextNode(node); // next node at index 3 }
A node in a DoubleLinkedList containing a value and references to adjacent nodes. Implemented as a tuple for optimal memory layout and performance.