Solución
solution.tsTypeScript
public class Solution {
public int countVowels(String text) {
String[] vowels = { "a", "e", "i", "o", "u" };
String[] words = text.split("");
int count = 0;
for (int index = 0; index < words.length; index++) {
String currentLetter = words[index];
for (String letter : vowels) {
if ( currentLetter.toLowerCase().equals(letter) ) {
count++;
}
}
}
return count;
}
}0respuestas