forked from M3-Academy/challenge-algorithms-v2.0
Merge branch 'feature/06-sum' into development
This commit is contained in:
commit
48045dae40
@ -1,4 +1,4 @@
|
||||
export function sum(values) {
|
||||
// implementar logica aqui
|
||||
|
||||
if(values.length < 1) return 0;
|
||||
return values.reduce((previousValue, currentValue) => previousValue + currentValue);
|
||||
}
|
Loading…
Reference in New Issue
Block a user