feat(sum): implementa function
This commit is contained in:
parent
e7aa3ebfa4
commit
0d5a0e9130
@ -1,4 +1,9 @@
|
|||||||
export function sum(values) {
|
export function sum(values) {
|
||||||
// implementar logica aqui
|
|
||||||
|
let total = 0;
|
||||||
|
|
||||||
|
for(let i = 0; i < values.length; i++){
|
||||||
|
total += values[i];
|
||||||
|
} return total;
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user