fix(maxvalue)terminando

This commit is contained in:
Andresa Rodrigues Figueira Combat 2022-11-02 15:07:34 -03:00
parent e0fd9b8e4a
commit a561a42a38

View File

@ -1,8 +1,7 @@
export function maxValue(values) {
var arr = values;
const arr = values;
if (arr.length == 0) return 0;
var max1 = arr.reduce(function (a, b) {
const max1 = arr.reduce(function (a, b) {
return Math.max(a, b);
}, -Infinity);