export function mostUsedChar(text) { // implementar logica aqui let counts = {}; Array.from(text).forEach((count) => { counts[count] = (counts[count] || 0) + 1; }); const maxVal = Math.max(...Object.values(counts)); const num = Object.keys(counts).find((key) => { return counts[key] === maxVal; }); return num; }