From 4e0a8ab21b4af5234e02bad6b7f03e623f14b72d Mon Sep 17 00:00:00 2001 From: Nicolas Oliveira <110689312+thedevnicolas@users.noreply.github.com> Date: Fri, 28 Oct 2022 10:18:46 -0300 Subject: [PATCH] feat(desafio03):desafio-completo --- 03-maxValue/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/03-maxValue/index.js b/03-maxValue/index.js index e433b31..b278e4c 100644 --- a/03-maxValue/index.js +++ b/03-maxValue/index.js @@ -1,4 +1,10 @@ export function maxValue(values) { // implementar logica aqui - + if (values.length === 0) { + + return 0; + } + + return Math.max.apply(null,values); + } \ No newline at end of file