feat(maxValue): desenvolvimento da funcao

This commit is contained in:
Filipe Quintanilha Evangelista 2022-10-28 12:47:12 -03:00
parent 2766fa2594
commit 2fcbcd717c

View File

@ -1,4 +1,13 @@
export function maxValue(values) {
// implementar logica aqui
if(values.length === 0){
return 0;
}
let maior = values[0];
values.map(element =>{
if (element > maior)
maior = element;
});
return maior;
}