forked from M3-Academy/challenge-algorithms-v2.0
12 lines
191 B
JavaScript
12 lines
191 B
JavaScript
export function sumEven(value) {
|
|
// implementar logica aqui
|
|
let soma = 0;
|
|
|
|
value.map(
|
|
(element) => {
|
|
if(element % 2 === 0)
|
|
soma += element;
|
|
}
|
|
);
|
|
return soma;
|
|
} |