Created
June 16, 2020 13:37
-
-
Save inneroot/387aed7a8be32fca0654ea2fd0329de6 to your computer and use it in GitHub Desktop.
Concurrent loop through array of Promises
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
callApi = [url1, url2, url3] | |
const pormiseArr = callApi.map(v => getFromApi(v)) | |
const ConcurrentLoop = async() => { | |
for await (const resolvedPromise in pormiseArr) { | |
console.log(resolvedPromise) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment