You are viewing a single comment's thread. Return to all comments →
JS has a pretty one liner for this.
let result = arr.reduce((previous, current) => previous + current , 0); console.log(result);
Seems like cookies are disabled on this browser, please enable them to open this website
A Very Big Sum
You are viewing a single comment's thread. Return to all comments →
JS has a pretty one liner for this.