Two Sum Problem Solution Leetcode Javascript