Skip to content

Instantly share code, notes, and snippets.

@Shakil-Shahadat
Last active December 18, 2021 01:30
Show Gist options
  • Save Shakil-Shahadat/106a12ab843c748663affb8096b7ff29 to your computer and use it in GitHub Desktop.
Save Shakil-Shahadat/106a12ab843c748663affb8096b7ff29 to your computer and use it in GitHub Desktop.
JavaScript Timing Events
// One time event
setTimeout( function(){}, 1000 );
// Repetitive event
setInterval( function(){}, 1000 );
// If these need to be canceled, then assign them
// to a variable and then clear them like this.
clearTimeout( assignedVar );
clearInterval( assignedVar );
@Shakil-Shahadat
Copy link
Author

Move this to miscellaneous.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment