Merge branch 'feature/maxvalue' into development

This commit is contained in:
Marcello Rodrigues Martins 2022-10-29 16:26:02 -03:00
commit db438cbf0e

View File

@ -1,4 +1,14 @@
export function maxValue(values) {
// implementar logica aqui
if (values.length == 0){
return 0;
}
return values.reduce((maiornum,atualnum) => {
if(maiornum > atualnum){
return maiornum;
}
else{
return atualnum;
}
})
}