Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

clear all intervals js

// Get a reference to the last interval + 1
const interval_id = window.setInterval(function(){}, Number.MAX_SAFE_INTEGER);

// Clear any timeout/interval up to that id
for (let i = 1; i < interval_id; i++) {
  window.clearInterval(i);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #clear #intervals #js
ADD COMMENT
Topic
Name
6+1 =