code:
a = Math.floor((Math.random()*(Nouns.length-1)));
b = Math.floor((Math.random()*(VerbsES.length-1)));
d = Math.floor(((Math.random()*16)+14));
e = Math.floor((Math.random()*(Places.length-1)));
f = Math.floor((Math.random()*(PlacesPrepos.length-1)));
g = Math.floor((Math.random()*(Adjectives.length-1)));
//person
if (string.match(/!person/i)){
c = Math.floor((Math.random()*(Person.length-1)));
string=string.replace(/!person/i, Person[c])}
//verb
if (!(c==0||c==1||c==2||c==3||string.match(/!i/i)||string.match(/!you/i)||string.match(/!we/i)||string.match(/!they/i)))
string=string.replace(/!verbs/, VerbsES[b])
else
{
string=string.replace(/!verbs/i, Verbs[b])
string=string.replace(/!/g,"")
}
well I want It replace more then one time but every time different number
e.g
string=!person !person
and every person is different but I don't want to use useless loops or anything