Answers for "delay function execution javascript and cancel"

1

run a function after delay javascript

setTimeout(function() { your_func(); }, 5000);
Posted by: Guest on January-11-2021
1

javascript stop delay

function example(){
	console.log("this is an example"); 
}

let functionID = setTimeout(example, 100); //the delay time is set to 100ms
clearTimeout(functionID); //cancel the setTimeout()
Posted by: Guest on June-17-2021

Code answers related to "delay function execution javascript and cancel"

Code answers related to "Javascript"

Browse Popular Code Answers by Language