- Notifications
You must be signed in to change notification settings - Fork931
Closed
Labels
Description
In the add() function inlinked-list.js I see the following line of code:if (current.next) { current.next.previous = newNode; } // <7>
What is the reason behind this line of code? If we are inserting behind current, I don't know why would you set the current.next.previous to the node we wanna insert.