Ad
  • Custom User Avatar
    1. "Y" is not counted as a vowel (see description)
    2. You don't need commas in the square brackets in the regex
    3. Your code will return an error if there are 0 matches. This is because str.match() will return null if no matches are found, then your code attempts to find null.length which leads to the error (null has no length)