feature/algoritmos #1

Merged
caroline_moran merged 12 commits from feature/algoritmos into master 2022-10-28 13:25:52 +00:00
Showing only changes of commit 0295676121 - Show all commits

View File

@ -1,4 +1,10 @@
export function mostUsedChar(text) {
// implementar logica aqui
return ""
}
// implementar logica aqui
let textLower = text.toLowerCase().split("").sort();
for (let index = 1; index < textLower.length; index++) {
textLower = textLower.filter((e, i, a) => a.indexOf(e) !== i);
}
let letter = [...new Set(textLower)];
return letter.join("");
}