From 1db8a79f3b59d85c56132d0905843420e2cb6868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cain=C3=A3=20Milech?= Date: Fri, 28 Oct 2022 17:56:18 -0300 Subject: [PATCH] feat(maxValue): implementa function --- 03-maxValue/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/03-maxValue/index.js b/03-maxValue/index.js index e433b31..9dc5fea 100644 --- a/03-maxValue/index.js +++ b/03-maxValue/index.js @@ -1,4 +1,6 @@ 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