From 456a54299d6f68f691b99959118b7e636713fb9f Mon Sep 17 00:00:00 2001 From: Patrick Date: Sun, 30 Oct 2022 11:01:51 -0300 Subject: [PATCH] feat algoritmo 3 --- 03-maxValue/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/03-maxValue/index.js b/03-maxValue/index.js index e433b31..ef50539 100644 --- a/03-maxValue/index.js +++ b/03-maxValue/index.js @@ -1,4 +1,6 @@ export function maxValue(values) { + if (values.length == 0) return 0; + return Math.max(...values); + // implementar logica aqui - -} \ No newline at end of file +}