Solución
solution.tsTypeScript
function countWordsByLength(sentence: string, length: number): number {
return sentence.split(' ').filter(word => word.length === length).length;
}
// No modificar: necesario para evaluar el resultado.
export { countWordsByLength };0respuestas