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()
This is the shortest solution
function getCount(str) { return (str.match(/[aeiou]/ig)||[]).length; }