From 89dda96dfd09364058f9aaf5812ade10b1843dac Mon Sep 17 00:00:00 2001 From: ManuelaLuanaSchumackerTavares Date: Fri, 28 Oct 2022 14:53:24 -0300 Subject: [PATCH] feat(desafio): Adiciona terceira tarefa concluida --- 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..e296f5e 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 == 1){ + return values[i]; + }else if(values.length == []){ + return 0; + }else{ + return Math.max.apply(null, values); + } } \ No newline at end of file