From a561a42a387918f7621c9aac0ce3e590d88ce140 Mon Sep 17 00:00:00 2001 From: Andresa Date: Wed, 2 Nov 2022 15:07:34 -0300 Subject: [PATCH] fix(maxvalue)terminando --- 03-maxValue/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/03-maxValue/index.js b/03-maxValue/index.js index f07346f..7d8f42a 100644 --- a/03-maxValue/index.js +++ b/03-maxValue/index.js @@ -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);