JavaScript: How to implement the linked list data structure (part3)