From 31a926baf20050ad503be0774f87498eefe11eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Naian=20F=C3=A9lix?= Date: Fri, 28 Oct 2022 08:19:41 -0300 Subject: [PATCH] feat: resolve maxValue --- 03-maxValue/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/03-maxValue/index.js b/03-maxValue/index.js index e433b31..beb3856 100644 --- a/03-maxValue/index.js +++ b/03-maxValue/index.js @@ -1,4 +1,8 @@ export function maxValue(values) { // implementar logica aqui + if (values.length === 0) return 0; + else { + return Math.max (...values) + } } \ No newline at end of file