Solución
solution.tsTypeScript
function countCapitalizedWords(text: string): number {
//return text.length === 0 ? 0 : text.split(" ").filter(x => x.charAt(0) === x.charAt(0).toUpperCase()).length;
return text.split(" ").filter(word => /^\p{Lu}/u.test(word)).length;
}
// No modificar: necesario para evaluar el resultado.
export { countCapitalizedWords };0respuestas