Answers for "how to find vowel count and how many vowel repeated in the string using javascript"

1

how to make a vowel counter in javascript

const vowelCount = str => {
  let vowels = /[aeiou]/gi;
  let result = str.match(vowels);
  let count = result.length;

  console.log(count);
};
Posted by: Guest on April-08-2020
0

how to make a vowel counter in javascript

function getCount(str) {
let vowelList = 'AEIOUaeiou'
let vowelsCount = 0;

 for(var i = 0; i < str.length ; i++)
  {
    if (vowelList.indexOf(str[i]) !== -1)
    {
      vowelsCount += 1;
    }
  }
  return vowelsCount;
}
Posted by: Guest on April-05-2020

Code answers related to "how to find vowel count and how many vowel repeated in the string using javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language