From fff7022e81236951062647c6ee6bc92db815bf8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Gabriel?= <=> Date: Fri, 28 Oct 2022 08:33:54 -0300 Subject: [PATCH] =?UTF-8?q?fix(mostUsedChar):=20Corre=C3=A7=C3=A3o=20nono?= =?UTF-8?q?=20exerc=C3=ADcio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 09-mostRepeatedChar/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/09-mostRepeatedChar/index.js b/09-mostRepeatedChar/index.js index 9151855..1c0e6bb 100644 --- a/09-mostRepeatedChar/index.js +++ b/09-mostRepeatedChar/index.js @@ -1,5 +1,5 @@ export function mostUsedChar(text) { - let cont = 0, i, j, contador = 0, valorFinal; + let cont = 0, contador = 0, finalVlue; let texto = text.split(""); for (let i = 0; i < texto.length; i++) { @@ -11,8 +11,8 @@ export function mostUsedChar(text) { } if (cont >= contador) { contador = cont; - valorFinal = texto[i] + finalVlue = texto[i] } } - return valorFinal; + return finalVlue; } \ No newline at end of file