Completed javascript singly linked list.