desafio 03-concluido

This commit is contained in:
Douglas Vinicius Nobrega 2022-10-28 17:40:31 -03:00
parent 131d096057
commit 00658561b1

View File

@ -1,4 +1,10 @@
export function maxValue(values) {
// implementar logica aqui
}
//Math.max.apply(null, values); outro método
if(values.length === 0) {
return 0
} else {
return Math.max(...values); // método spred, vai espelhar a array e vai retorna o maior valor
}
}