From 8aabaf9fadb79676a5a7d8aacf377651db1c8fda Mon Sep 17 00:00:00 2001 From: Gabriel Ferraz Date: Fri, 28 Oct 2022 11:51:07 -0300 Subject: [PATCH] =?UTF-8?q?(maxValue):=20implementa=C3=A7=C3=A3o?= =?UTF-8?q?=20do=20c=C3=B3digo=20maxValue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 03-maxValue/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/03-maxValue/index.js b/03-maxValue/index.js index e433b31..2327b0d 100644 --- a/03-maxValue/index.js +++ b/03-maxValue/index.js @@ -1,4 +1,8 @@ export function maxValue(values) { // implementar logica aqui - + if (values.length == 0){ + return 0 + }else{ + return Math.max(...values) + } } \ No newline at end of file