I\'m using basic JavaScript to count the number of vowels in a string. The below code works but I would like to have it cleaned up a bit. Would using .includes()
.includes()
Use match but be careful as it can return a null if no match is found
match
const countVowels = (subject => (subject.match(/[aeiou]/gi) || []).length);