Three Sum Problem Leetcode Javascript Question