Created
July 29, 2021 09:13
-
-
Save apotox/5bb2ffa02ffef62bbaefb473ade164e2 to your computer and use it in GitHub Desktop.
setinterval
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
const handler=()=>{ | |
console.log("hello") | |
} | |
// call the handler function every 2sec | |
let stopper = setInterval(handler, 2000) | |
// stop the setInterval method | |
clearInterval(stopper) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment