Linked List Implementation Leetcode Javascript