From b27cae87952e7c6b911eb40bd86f903f77e9514e Mon Sep 17 00:00:00 2001 From: Rhayllon Date: Sat, 29 Oct 2022 03:34:48 -0300 Subject: [PATCH] Feat(Desafio_2.3): Cria resposta desafio 2.3 --- 03-maxValue/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/03-maxValue/index.js b/03-maxValue/index.js index e433b31..3b43b38 100644 --- a/03-maxValue/index.js +++ b/03-maxValue/index.js @@ -1,4 +1,9 @@ export function maxValue(values) { // implementar logica aqui - + if(values.length > 0){ + return Math.max.apply(null, values); + } + else{ + return 0; + } } \ No newline at end of file