Skip to content

Instantly share code, notes, and snippets.

@0chroma
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0chroma/5c52dbb697069a08ad2d to your computer and use it in GitHub Desktop.
Save 0chroma/5c52dbb697069a08ad2d to your computer and use it in GitHub Desktop.
the only es7 feature I care about
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