0

I am trying to something like this:

var time = 2000;
var counter = 0;
var looper = setInterval(function () {

                if(counter == 0){

                        time = 5000;

                }else if(counter == 1){

                        time = 10000;

                }
                counter++;

            }, time);

When my counter is a certain number, then I want the timer time to be different, the following I have tried does not work :) my timer stays at 2000, what am I doing wrong, or is what I am trying to do not possible?

user979331
  • 11,039
  • 73
  • 223
  • 418

0 Answers0