programming-examples/js/Vre1/Count the number of vowels in a given string.js
2019-11-15 12:59:38 +01:00

7 lines
193 B
JavaScript

function vowel_count(str) {
return str.match(/[aeiou]/gi).length;
}
console.log(vowel_count('The quick brown fox jumps over the lazy dog'));