About 15,500,000 results
Open links in new tab
  1. How can I use setInterval and clearInterval? - Stack Overflow

    var handle = setInterval(drawAll, 20); // When you want to cancel it: clearInterval(handle); handle = 0; // I just do this so I know I've cleared the interval On browsers, the handle is guaranteed to be a number …

  2. What's the difference between recursive setTimeout versus setInterval?

    Nov 23, 2019 · As the result- the browser is stuck. To prevent this behavior, the best way is to run setTimeout inside setTimeout to emulate setInterval. To correct timeouts between setTimeout calls, …

  3. javascript - How to exit from setInterval - Stack Overflow

    Nov 25, 2009 · How to exit from setInterval Asked 16 years ago Modified 3 years, 11 months ago Viewed 133k times

  4. javascript - 'setInterval' vs 'setTimeout' - Stack Overflow

    What is the main difference between setInterval and setTimeout in JavaScript?

  5. Pass parameters in setInterval function - Stack Overflow

    Jan 19, 2009 · Please advise how to pass parameters into a function called using setInterval. My example setInterval(funca(10,3), 500); is incorrect.

  6. Execute the setInterval function without delay the first time

    Jun 9, 2015 · It's there a way to configure the setInterval method of javascript to execute the method immediately and then executes with the timer

  7. JavaScript setInterval and `this` solution - Stack Overflow

    3 With modern browsers the setInterval method allows additional parameters which are passed through to the function specified by func once the timer expires. Hence, a possible solution can be:

  8. Stop setInterval call in JavaScript - Stack Overflow

    Sep 8, 2020 · I am using setInterval(fname, 10000); to call a function every 10 seconds in JavaScript. Is it possible to stop calling it on some event? I want the user to be able to stop the repeated refresh o...

  9. SetInterval () with "if" condition in js function - Stack Overflow

    Oct 8, 2017 · I would like to continuously call the function below using setInterval() but only if the condition in the if statement evaluates to true. Note: The function is global.

  10. TypeScript - what type is setInterval - Stack Overflow

    Dec 7, 2022 · As it's mentioned in other answers, the type of setInterval is either :number or :NodeJS.Timer. I would like to extend the scope of the answer a little bit if anyone is looking to use …