Created
August 4, 2023 16:21
-
-
Save suhailgupta03/f703ada8790178b0f3706d7e0a34c34a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// setInterval(function() { | |
// console.log("Playing MP4"); | |
// },500); // continuous loop | |
// // every 500 ms, it will print "Playing MP4" | |
setTimeout(function() { | |
console.log("Downloaded MP4"); | |
}, 3000); // 3s | |
console.log("Starting to download"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
let i = 1;
let intvl = setInterval(function() {
if(i > 5) {
clearInterval(intvl);
}else {
console.log(i++);
}
},500);