export function mostUsedChar(text) { // implementar logica aqui const Objeto = {}; let Contador = 0; let mostUsedChar = ""; for (let char of text) { Objeto[char] = Objeto[char] + 1 || 1; } for (let key in Objeto) { if (Objeto[key] > Contador) { Contador = Objeto[key]; mostUsedChar = key; } } return mostUsedChar; }