Answer by Nasser Torabzade for How to increment variable by 1 to limit, then rewind and repeat increment – jQuery

for(i=0,a=1; i<20; i++,a++){
  //do something with var
  a==10 ? a=1 : null ;
}

Leave a Reply

Your email address will not be published. Required fields are marked *