Ad
Fundamentals
Arrays
Data Types
Code
Diff
  • var sum=0;
    const getSum = (array) => {sum=0; array.every( Sum = (curvalue) => {sum+=curvalue; return true; }); return sum;}
    • function getSum(array) {
    • //your code
    • }
    • var sum=0;
    • const getSum = (array) => {sum=0; array.every( Sum = (curvalue) => {sum+=curvalue; return true; }); return sum;}