Build a Sentence Analyzer - Step 2

Tell us what’s happening:

Im not getting what im doing wrong in step 2. console says
“Vowel Count: 7”

Your code so far

function getVowelCount(sentence) {
  const vowels = "aeiou";
  let count = 0;

  for (const char of sentence.toLowerCase()) {
    if (vowels.includes(char)) {
      count++;
    }
  }
  return count;
}


// User Editable Region

const vowelCount = getVowelCount("Apples are tasty fruits");
console.log (`"Vowel Count: ${vowelCount}"`);

// 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/143.0.0.0 Safari/537.36

Challenge Information:

Build a Sentence Analyzer - Step 2

Remove these (“) quotes and the space after the console.log. Sometimes the tests can’t tell “console.log ()” and “console.log()” are the same. Your code is technically correct but it do be like that sometimes.

ty that worked. such silly mistake