Skip to content

Instantly share code, notes, and snippets.

@happymishra
Last active June 16, 2019 06:58
Show Gist options
  • Save happymishra/490f42538e50c77e34249381a79a8625 to your computer and use it in GitHub Desktop.
Save happymishra/490f42538e50c77e34249381a79a8625 to your computer and use it in GitHub Desktop.
var timerId = setTimeout(function (){
console.log("This function will be removed before it's executed")
}, 100)
clearTimeout(timerId)
// No output will be displayed as the setTimeout callback function
// will be cancelled before it will be executed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment