Created
May 7, 2018 07:45
-
-
Save trungpv1601/33882ffdb5d570bf4b5fef75a5ee09fa to your computer and use it in GitHub Desktop.
Async Map in Javascript
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 arr = [ { key: 1 }, { key: 2 }, { key: 3 } ] | |
const result = arr.map(async (obj) => { return obj.key; }); | |
console.log(`Result: ${result}`); | |
// outputs "Result: ???" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment