Solución
solution.tsTypeScript
export function topNWords(text: string, n: number): string[] {
// Escribe tu solución aquí
const textArray = text.split(' ')
const obj = {}
textArray.forEach(v => {
const lower = v.toLowerCase()
obj[lower] = (obj[lower] || 0) + 1
})
return Object.keys(obj).splice(0,n);
}0respuestas