Maximum Non Adjacent Sum Leetcode Javascript Practice