Merge pull request 'feat: implementa função do valor maximo' (#3) from feature/maxValue into development

Reviewed-on: #3
This commit is contained in:
RodrigoJorge 2022-10-28 19:34:41 +00:00
commit ace13a4c66

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;
}