feat: implementa função do valor maximo #3

Merged
RodrigoJorge merged 1 commits from feature/maxValue into development 2022-10-28 19:34:41 +00:00
Showing only changes of commit 70f64ffee3 - Show all commits

View File

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