forked from M3-Academy/challenge-algorithms-v2.0
comitando sum
This commit is contained in:
parent
c532877cc1
commit
7dd059e3de
@ -1,4 +1,19 @@
|
||||
export function sum(values) {
|
||||
// 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);
|
||||
|
Loading…
Reference in New Issue
Block a user