Row Sum Print Leetcode Problems Javascript Snake