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