//function to find vowel
const vowel = (str)=>{
//these are vowels we want to check for
const check = ['a','e','i','o','u'];
//keep track of vowels
var count = 0;
for(let char of str.toLowerCase())
{
//check if each character in string is in vowel array
if(check.includes(char)) count++;
}
return count;
}
console.log(vowel("hello there"));