From eff82acf6d9e3a9d258c3f924c86be1ef77322c3 Mon Sep 17 00:00:00 2001 From: Gabriel Gomes Date: Mon, 31 Oct 2022 13:28:42 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20Adiciona=20o=20c=C3=B3digo=20do=20desaf?= =?UTF-8?q?io=203?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 03-maxValue/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/03-maxValue/index.js b/03-maxValue/index.js index e433b31..a588023 100644 --- a/03-maxValue/index.js +++ b/03-maxValue/index.js @@ -1,4 +1,9 @@ export function maxValue(values) { // implementar logica aqui + if (values.length == 0) + + return 0; + + return Math.max(...values,); } \ No newline at end of file