From df0dc7296842e0f1208eb7522430c81f76ebb1b6 Mon Sep 17 00:00:00 2001 From: Luiz Felipe Silva Date: Mon, 31 Oct 2022 22:17:59 -0300 Subject: [PATCH] feat(maxValue): algoritmo criado. --- 03-maxValue/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/03-maxValue/index.js b/03-maxValue/index.js index e433b31..2f2e99d 100644 --- a/03-maxValue/index.js +++ b/03-maxValue/index.js @@ -1,4 +1,8 @@ export function maxValue(values) { // implementar logica aqui + let numMaior = Math.max.apply(null, values); + if(values.length == []) return 0; + + return numMaior; } \ No newline at end of file -- 2.34.1