cumulative summation of an array. the returned array has its length increased by one.
cumulativeSum([10, 20, 30, 40, 50]) // returns [0, 10, 30, 60, 100, 150] Copy
cumulativeSum([10, 20, 30, 40, 50]) // returns [0, 10, 30, 60, 100, 150]
cumulative summation of an array. the returned array has its length increased by one.
Example