js replace vowels 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);
}