Solución
solution.tsTypeScript
function countVowels(text: string): number {
const regexvocales = /[aeiou]/gi;
let total = text.match(regexvocales);
if(total === null) return 0;
return total.length;
}
// No modificar: necesario para evaluar el resultado.
export { countVowels };0respuestas