feature/algorithms #1

Merged
Vitor_soares merged 10 commits from feature/algorithms into master 2022-10-28 23:12:43 +00:00
Showing only changes of commit b4852810c4 - Show all commits

View File

@ -1,4 +1,14 @@
export function mostUsedChar(text) {
// implementar logica aqui
return ""
let max = 0
let maxChar = ''
text.split('').forEach((char) => {
if(text.split(char).length > max) {
max = text.split(char).length;
maxChar = char;
}
});
return maxChar
}