somando um array

This commit is contained in:
Carlos cristovao guerreiro scantbelruy 2022-10-28 08:17:33 -04:00
parent 0f4862a8d5
commit fefb2522c8

View File

@ -1,4 +1,8 @@
export function sum(values) {
// implementar logica aqui
var arr = values;
var soma = 0;
for(var i = 0; i < arr.length; i++) {
soma += arr[i];
}
return soma;
}