Answers for "How to extract vowels from a string in JavaScript"

-1

find vowels in string javascript

var name = userInput[0];
    var count =0;
  	function findvowel(name)
    {
    	var vowel = ['a','e','i','o','u','A','E','I','O','U'];
      	for(i=0;i<name.length;i++)
      	{
      		if(vowel.includes(name[i]))
        	{
          		count++;
        	}
      	}
      	return count;
    }
    
  console.log(findvowel(name));
Posted by: Guest on December-06-2020

Code answers related to "How to extract vowels from a string in JavaScript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language