Last active
June 22, 2024 13:29
-
-
Save Shakil-Shahadat/106a12ab843c748663affb8096b7ff29 to your computer and use it in GitHub Desktop.
[ Delete ] JavaScript Timing Events
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Move this to miscellaneous.js.