Level
LeetCode Easy
Recruitment
var runningSum = function (nums) {
  const arr = Array(nums.length);
  arr[0] = nums[0];

  for (let i = 1; i < nums.length; i++) {
    arr[i] = arr[i - 1] + nums[i];
  }

  return arr;
};