Tell us what’s happening:
- Your getVowelCount function should return the correct vowel count for any sentence.
Hi and sorry for the inconvenience but someone can help me?
Your code so far
// User Editable Region
function getVowelCount(sentence) {
const vowel = ["a", "e", "i", "o", "u", "y"];
let count = 0;
for (let char of sentence) {
if (vowel.includes(char)) {
count++ ;
}
}
return count;
};
let a = getVowelCount("aeiouy. AEIOUY.");
console.log(a); //6
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
Challenge Information:
Build a Sentence Analyzer - Step 1