Solución
solution.tsTypeScript
public class Solution {
public int countConsonants(String text) {
// Escribe tu solución aquí
int count = 0;
for(int i = 0; i < text.length(); i++) {
char letter = text.charAt(i);
if(Character.isLetter(letter)) {
if("aeiou".indexOf(letter) == -1) {
count++;
}
}
}
return count;
}
}0respuestas