Hello
The task Return the number of data vowels in the string
Here is my code
function getCount(str) { var vowelsCount = 0; var vowels = ['a', 'e', 'i', 'o', 'u']; var modernStr = str.split(''); for (var i = 0; i < modernStr.length; ++i) { if(modernStr.includes(vowels[i])) vowelsCount++ } return vowelsCount; } getCount('aviiiiiii')
But it does not work, I can not understand why
I will be grateful for the help