feat: Finalizando terceiro exercício

This commit is contained in:
tiago medeiros rodrigues 2022-11-02 16:30:21 -03:00
parent c11233d910
commit fed221dd71

View File

@ -1,6 +1,14 @@
export function maxValue(values) {
// implementar logica aqui
if (values.length === 0) {
return 0;
}
else {
let maxNumber = values.reduce((a, b) => Math.max(a, b))
return maxNumber;
}
}