Created
October 4, 2018 21:27
-
-
Save mitchellporter/e4b6784f8e93ca52df75f67a4a1da59e to your computer and use it in GitHub Desktop.
async for each example source: https://github.com/babel/babel/issues/909#issuecomment-76497435
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
async function test(){ | |
let arr = [1,2,3]; | |
await* arr.map(async (num) => { | |
let result = await getData(num); | |
console.log(result); | |
}); | |
console.log('after foreach'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment