feature/algoritmo #11

Merged
ManuelaLuanaSchumackerTavares merged 21 commits from feature/algoritmo into master 2022-10-31 17:24:28 +00:00
Showing only changes of commit b0132bc0e9 - Show all commits

View File

@ -1,4 +1,12 @@
export function mostUsedChar(text) { export function mostUsedChar(text) {
// implementar logica aqui // implementar logica aqui
return "" let letraRepetida;
let str = text.toLowerCase().replace(/\,*\s/g, "").split("", text.length);
for(let i = 0; i < text.length; i++){
for(let maisRepetida = i + 1; maisRepetida < text.length; maisRepetida++){
letraRepetida = str[i];
}
}
return letraRepetida;
} }