forked from M3-Academy/challenge-algorithms-v2.0
8 lines
148 B
JavaScript
8 lines
148 B
JavaScript
export function sum(values) {
|
|
var arr = values;
|
|
var soma = 0;
|
|
for(var i = 0; i < arr.length; i++) {
|
|
soma += arr[i];
|
|
}
|
|
return soma;
|
|
} |