Skip to content

Instantly share code, notes, and snippets.

@happymishra
Created July 2, 2019 13:54
Show Gist options
  • Save happymishra/53ec47ea277a90f10e18248d7efa5f5b to your computer and use it in GitHub Desktop.
Save happymishra/53ec47ea277a90f10e18248d7efa5f5b to your computer and use it in GitHub Desktop.
function delayFuncExec() {
// This statement will not be printed as it will be cancelled by
// clearTimeout
console.log("I will not be executed as I will be cancelled");
}
var timerId = setTimeout(delayFuncExec, 100)
console.log("Timer Id: " + timerId)
clearInterval(timerId)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment