Answers for "function that counts the number of vowels ina string and returns them as a string"

1

how to make a vowel counter in javascript

function countVowels(str) {
  return str.match(/[aeiou]/g).length;
}
Posted by: Guest on April-09-2020
0

count vowels in a string javascript

// BEST and FASTER implementation using regex
const countVowels = (str) => (str.match(/[aeiou]/gi) || []).length
Posted by: Guest on August-17-2020

Code answers related to "function that counts the number of vowels ina string and returns them as a string"

Code answers related to "Javascript"

Browse Popular Code Answers by Language