find the vowel js

Solutions on MaxInterview for find the vowel js by the best coders in the world

showing results for - "find the vowel js"
Sara
12 Nov 2019
1function vowel_count(str1)
2{
3  var vowel_list = 'aeiouAEIOU';
4  var vcount = 0;
5  
6  for(var x = 0; x < str1.length ; x++)
7  {
8    if (vowel_list.indexOf(str1[x]) !== -1)
9    {
10      vcount += 1;
11    }
12  
13  }
14  return vcount;
15}
16console.log(vowel_count("The quick brown fox"));