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