Anyone know what's going on?
CodePudding user response:
Var time=20003,N=0;
SetInterval (function () {
The console. The log (n++);
}, time);
You refer to this example
CodePudding user response:
SetInterval second parameter variables as long as is really value, is not a problem, it is best to be sent out to look at the code has a problem where writtenCodePudding user response:
I use clearInterval can remove at the front of the timer, but pass any time parameters, according to a second cycle, even in a shorter cycle run,CodePudding user response:
Not set the time interval is invalid, but before the start of the timer is not properly closed, after repeatedly to start the timer to your feeling is the actual timer interval shorter than setting the time interval,CodePudding user response:
The second parameter is the unit of milliseconds, positive integers less than 1000 will run in a secondsCodePudding user response: