Leetcode Solution Two Sum Problem In Javascript Object