Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

var sumArray = function(arr) {};

var sumArray = function(arr) {
    total = 0;
    for (let i=0; i<arr.length; i++) {
        total += arr[i];
    }
    return total;
};
 
PREVIOUS NEXT
Tagged: #var #sumArray
ADD COMMENT
Topic
Name
6+3 =