LeetCode #1800 Maximum Ascending Subarray Sum
var maxAscendingSum = function(nums) {
let answer = nums[0];
let sum = nums[0];
for(let i = 1; i < nums.length; i++) {
let cur = nums[i];
if(cur <= nums[i-1]) {
sum = 0;
}
sum += cur;
answer = Math.max(answer, sum);
}
return answer;
};