Q:

Write a JavaScript program to count the number of vowels in a given string

0

Write a JavaScript program to count the number of vowels in a given string.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

function vowel_Count(str)
{ 

  return str.replace(/[^aeiou]/g, "").length; 
}

console.log(vowel_Count("Python"));
console.log(vowel_Count("w3resource.com"));

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now