From 4af6fcb6bf77800a1395fd2f0474570ae62bf035 Mon Sep 17 00:00:00 2001 From: carloswinter Date: Fri, 28 Oct 2022 15:56:15 -0300 Subject: [PATCH] feat(maxValue): adiciona resolucao questao03-maxValue --- 03-maxValue/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/03-maxValue/index.js b/03-maxValue/index.js index e433b31..7539ea0 100644 --- a/03-maxValue/index.js +++ b/03-maxValue/index.js @@ -1,4 +1,6 @@ export function maxValue(values) { // implementar logica aqui - + if(Math.max.apply(undefined ,values) == -Infinity) + return 0 + return Math.max.apply(undefined ,values); } \ No newline at end of file