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()
Short and ES6, you can use the function count(str);
const count = str => (str.match(/[aeiou]/gi) || []).length;