// BEST and FASTER implementation using regex const countVowels = (str) => (str.match(/[aeiou]/gi) || []).length