Answers for "js settimeout in functuion loop stop"

20

stop settimeout

var myVar;

function myFunction() {
  myVar = setTimeout(function(){ alert("Hello"); }, 3000);
}

function myStopFunction() {
  clearTimeout(myVar);
}
Posted by: Guest on February-19-2020
3

javascript settimeout loop

function timeout() {
    setTimeout(function () {
        // Do Something Here
        // Then recall the parent function to
        // create a recursive loop.
        timeout();
    }, 1000);
}
Posted by: Guest on April-23-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language