Answers for "how to loop vowel characters in javascript"

1

javascript replace vowel

function vowel2index(str) {
   return str.replace(/[aeiou]/ig, (m, i) => i + 1);
}
Posted by: Guest on February-15-2021
4

find vowel & consonants in a string java script

const str = "The quick brown fox jumps over a lazy dog"; 
const vowels = str.match(/[aeiou]/gi); 
const consonants = str.match(/[^aeiou]/gi);   
vowels.concat([''],consonants).forEach(k => { console.log(k); } );
Posted by: Guest on October-09-2020

Code answers related to "how to loop vowel characters in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language