Leetcode Two Sum Problem In Javascript Object Destructuring Vs Array