Solución
solution.tsTypeScript
function groupByLength(words: string[]): Record<number, string[]> {
// Escribe tu solución aquí
return words.reduce((acc,cur) => {
if(!acc[cur.length]) acc[cur.length] = [];
acc[cur.length].push(cur)
return acc
},{})
}
// No modificar: necesario para evaluar el resultado.
export { groupByLength };0respuestas