comitando sum

This commit is contained in:
Moises Antonio Hernandez Ferrer Gonçalves 2022-11-02 09:56:07 -03:00
parent c532877cc1
commit 7dd059e3de

View File

@ -1,4 +1,19 @@
export function sum(values) { export function sum(values) {
// implementar logica aqui // implementar logica aqui
var numbers = [1];
} var numbers = [1, 2];
var numbers = [1, 2, 3];
var numbers = [1, 2, 3, 4];
var numbers = [4, 6, 12, 5];
var numbers = [9, 234, 312, 999, 21, 2311];
var numbers = [533, 234, 23423, 32, 48876];
var numbers = [-1, 5, -10, -45];
var numbers = [-2, -7, -32];
var sum = 0;
}
for(var i =0;i<numbers.length;i++){
sum+=numbers[i];
}
console.log(sum);