forked from M3-Academy/challenge-algorithms-v2.0
Merge branch 'bugfix/mostRepeatedChar'
This commit is contained in:
commit
ff6187b0df
@ -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;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user