function getCount(str, counter = 0) {
if (counter >= str.length) return counter;
switch(str[counter]) {
case 'a': getCount(str, ++counter); break;
case 'e': getCount(str, ++counter); break;
case 'i': getCount(str, ++counter); break;
case 'o': getCount(str, ++counter); break;
case 'u': getCount(str, ++counter); break;
}
}
function getCount(str, i, counter = 0) {
if (i >= str.length) return counter;
if (['a', 'e', 'i', 'o', 'u'].indexOf(str[i]) != -1) {
return getCount(str, ++i, ++counter)
}
return getCount(str, ++i, counter);
}
function getCount(str, counter = 0) {
if (counter >= str.length) return counter;
switch(str[counter]) {
case 'a':
case 'e':
case 'i':
case 'o':
case 'u': return getCount(str, ++counter); break;
}
}