Ad
Code
Diff
  • const countVowel = str => str.split(/[aeiou]/i).length - 1
      
    • const countVowel = s => s.match(/[aeiou]/gi)?.length | 0
    • const countVowel = str => str.split(/[aeiou]/i).length - 1