Created
May 29, 2022 17:24
-
-
Save maifeeulasad/044b660553e9a18d39e8fe388a76d051 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
//maybe the worst implementation | |
const delay = ms => new Promise(res => setTimeout(res, ms)); | |
for(let i=0;i<100;i+=1){ | |
if(i%4===0){ | |
console.log("4"); | |
} | |
if(i%7===0){ | |
console.log("7"); | |
} | |
await delay(1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment