06.Vowel Count
-
Return the number (count) of vowels in the given string.
We will consider a, e, i, o, and u as vowels for this Kata.
function getCount(str) {
var vowelsCount = 0;
var yuan=["a","e","i","o",'u']
str.split("").filter(function(x,index){
for(var i=0;i<yuan.length;i++){
if(x==yuan[i]){
vowelsCount++;
}
}
})
// enter your majic here
return vowelsCount;
}测试:abracadabra