I am trying to delete all the vowels from a string within a function.
deleteVowels = myString.replace(/[aeiou]/i, "");
Deletes a,e,i,o,u from the string, however instead of (/[aeiou]/i), I want to pass in a value instead which is:
let vowels = "aeiou";
I have tried things such as:
deleteVowels = myString.replace(/[vowels]/i, ""); // and many other variatons.
I have searched SO and found similar, however, not being able to pass in a string keeping the letters separate. Would appreciate some support as I may be barking up the wrong tree here. Thanks