Entrega do Desafio #1

Merged
anacarolinaduartecavalcante merged 12 commits from feature/10-longestWords into master 2022-10-28 12:14:06 +00:00
Showing only changes of commit d8ba6787ab - Show all commits

View File

@ -1,4 +1,12 @@
export function maxValue(values) { export function maxValue(values) {
// implementar logica aqui // implementar logica aqui
if (values.length) {
let max = -Infinity;
for (let num of values) {
max = num > max ? num : max;
}
return max;
}
return 0;
} }