Mutable singly linked list in javascript, TODO: unit tests