Last active
August 31, 2021 09:15
-
-
Save asifvora/427eb83bafc35928acd180956359644c to your computer and use it in GitHub Desktop.
Async/Await Essentials for Production: Loops
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 timeoutPromise = (timeout) => new Promise((resolve) => setTimeout(resolve, timeout)); | |
const list = document.querySelectorAll('.L3NKy'); | |
function clikOnLink(link){ | |
link.click(); | |
} | |
const asyncLoop = async () => { | |
for (let i = 0; i < list.length ; i++) { | |
await timeoutPromise(1000); | |
clikOnLink(list[i]); | |
} | |
} | |
asyncLoop(); |
Your code work, thank you)
Bro how to use
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
well this just only follow the random people but i need something else