develop #11

Merged
HenriqueSantosSantana merged 20 commits from develop into master 2022-10-28 01:03:41 +00:00
Showing only changes of commit 04bbc0e63b - Show all commits

View File

@ -1,4 +1,15 @@
export function mostUsedChar(text) {
// implementar logica aqui
return ""
}
if (!text) return { error: 'Not Found Text' };
let max = 0,
maxChar = '';
for (let char of text) {
if (text.split(char).length > max) {
max = text.split(char).length;
maxChar = char;
}
}
return maxChar;
}