Leetcode Problems Two Sum Solution Javascript Function Parameters