feat(maxValue): fazendo funcão

This commit is contained in:
Caroline Moran 2022-10-28 07:35:13 -04:00
parent 2aac0d168b
commit 7536d3d99d

View File

@ -1,4 +1,11 @@
export function maxValue(values) {
// implementar logica aqui
}
if (values != `${[]}`) {
let max = values.reduce(function (a, b) {
return Math.max(a, b);
}, -Infinity);
return max;
} else {
return 0;
}
}