Created
June 7, 2017 02:12
-
-
Save kaidiren/3658137bec19cfeeb15beabbb76447e3 to your computer and use it in GitHub Desktop.
#es#
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
const urls = [1, 2, 3]; | |
async function download(urls) { | |
return urls.map(async (url) => { | |
const content = await Promise.resolve(url); | |
console.log(content); | |
return content; | |
}); | |
} | |
(async () => { | |
await download(urls); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment