From 753a4a9c77f33841c1b746ab095ecbe585c58bdc Mon Sep 17 00:00:00 2001 From: Carlos Lins Date: Thu, 27 Oct 2022 20:03:17 -0300 Subject: [PATCH] feat: Algoritmo 03-maxValue - finalizado --- 03-maxValue/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/03-maxValue/index.js b/03-maxValue/index.js index e433b31..d9e04e0 100644 --- a/03-maxValue/index.js +++ b/03-maxValue/index.js @@ -1,4 +1,7 @@ export function maxValue(values) { - // implementar logica aqui - + if(values.length === 0){ + return 0; + } + + return Math.max(...values); } \ No newline at end of file