Last active
August 29, 2015 14:13
-
-
Save 0chroma/5c52dbb697069a08ad2d to your computer and use it in GitHub Desktop.
the only es7 feature I care about
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
var promises = [1,2,3,4,5].map((i) => { | |
return new Promise((resolve) => { | |
setTimeout(() => resolve("test!"), i*1000); | |
}); | |
}); | |
promises.forEach(async (p) => console.log(await p)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment