From 3b622e2aba553e651a0760cdd6c190dbf877b88b Mon Sep 17 00:00:00 2001 From: Patrick Date: Fri, 28 Oct 2022 17:43:51 -0300 Subject: [PATCH] criando o codigo do valor maximo que deve retornar --- 03-maxValue/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/03-maxValue/index.js b/03-maxValue/index.js index e433b31..b925309 100644 --- a/03-maxValue/index.js +++ b/03-maxValue/index.js @@ -1,4 +1,8 @@ export function maxValue(values) { // implementar logica aqui - -} \ No newline at end of file + + if (values.length) { + return Math.max(...values) + } + return 0 +}