Solución
solution.tsTypeScript
function groupByLength(words: string[]): Record<number, string[]> {
// Escribe tu solución aquí
let rec: Record<number, string[]> = {};
for (const word of words) {
let key = word.length;
(rec[key] ??= []).push(word);
}
return rec;
}
// No modificar: necesario para evaluar el resultado.
export { groupByLength };0respuestas