Solución
solution.tsTypeScript
function countWordsStartingWithVowel(sentence: string): number {
let count = 0;
let vowels = 'aeiouAEIOU';
const words = sentence.split(' ')
for(let i = 0; i < words.length; i++) {
if(vowels.includes(words[i][0])){
count += 1
}
}
return count;
}
// No modificar: necesario para evaluar el resultado.
export { countWordsStartingWithVowel };0respuestas