Maximum Non Adjacent Sum Leetcode Javascript