Answers for "js loop to run every second"

2

run function every second javascript

setInterval(function(){ 
    //this code runs every second 
}, 1000);
Posted by: Guest on May-09-2021
0

js loop every x seconds

(function loop() {
  setTimeout(function () {
    // execute script
    loop()
  }, 9000); //9000 = 9000ms = 9s
}());
Posted by: Guest on November-09-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language