feat(maxValue): adicionando resolucao do desafio 3

maxValue
This commit is contained in:
Bernardo Cunha Ernani Waldhelm 2022-10-28 13:41:44 -03:00
parent a6170f5d79
commit 39ef165e71

View File

@ -1,4 +1,9 @@
export function maxValue(values) {
// implementar logica aqui
if (values.length < 1) {
return 0;
}
const maior = Math.max(...values);
return maior;
}