Row Sum Print Leetcode Problems Javascript Function