Skip to content

Instantly share code, notes, and snippets.

@ejnshtein
Created January 22, 2019 20:59
Show Gist options
  • Save ejnshtein/a238466ea1608d6d9afaaab108d3e92c to your computer and use it in GitHub Desktop.
Save ejnshtein/a238466ea1608d6d9afaaab108d3e92c to your computer and use it in GitHub Desktop.
const sleep = timeout => new Promise(resolve => setTimeout(resolve, timeout))
!(async () => {
for (chapter of array1) {
for (article of array2) {
console.log(`i=${chapter}, j=${article}`)
await sleep(5000)
}
}
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment