I want a function that will add a random symbol at the end of each sentence and remove all vowels. I know sentences could end with a ! or ? but lets just say these sentences will only end with a period. Each symbol has to be different I already inserted a asterisk to the end of the last sentence. How do I add a different symbol to the end of each sentence? This is what I have so far
function txtMod(str){
var vowels = /[aioue]/gi ;
var words = str.split(" ");
words.splice(words.length,2,"*");
var join = words.join(" ");
var toStr = join.toString();
return toStr.replace(vowels'');
}
txtMod("Hello world. This is just a test.");