Skip to content

Instantly share code, notes, and snippets.

@Daniel-Hug
Created November 7, 2018 03:27
Show Gist options
  • Save Daniel-Hug/09dff4df5a9623f83c011b3845f4b6b5 to your computer and use it in GitHub Desktop.
Save Daniel-Hug/09dff4df5a9623f83c011b3845f4b6b5 to your computer and use it in GitHub Desktop.
function runningSum(addends) {
var sums = [addends[0]];
for (var i=1; i<addends.length; i++) {
sums.push(addends[i]);
}
return sums;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment