x
1
Define regex for vowels
const vowelRegex = /[aeiou]/g;
2
Capture all vowels in string
const matches = text.split(vowelRegex);
3
Iterate through matches
for (const match of matches) { ... }
4
Build string and multiply vowels
for (let a = 0; a < multiply; a++) { ... }