diff --git a/09-mostRepeatedChar/index.js b/09-mostRepeatedChar/index.js index 4e5fb3e..dffd635 100644 --- a/09-mostRepeatedChar/index.js +++ b/09-mostRepeatedChar/index.js @@ -3,7 +3,7 @@ export function mostUsedChar(text) { letter = ""; text.split("").forEach(function (char) { if (text.split(char).length > count) { - max = text.split(char).length; + count = text.split(char).length; letter = char; } });