javascript replace vowels in a string code example
Example: javascript replace vowel
function vowel2index(str) {
return str.replace(/[aeiou]/ig, (m, i) => i + 1);
}
function vowel2index(str) {
return str.replace(/[aeiou]/ig, (m, i) => i + 1);
}