Sum Of Two Array Leetcode Problems Javascript