Union Of Two Linked Lists Leetcode Javascript