Skip to content

Instantly share code, notes, and snippets.

@ferreiratiago
Created June 14, 2018 08:52
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 ferreiratiago/2337af31a96dd7d5def7db0fe4ede910 to your computer and use it in GitHub Desktop.
Save ferreiratiago/2337af31a96dd7d5def7db0fe4ede910 to your computer and use it in GitHub Desktop.
for..wait..of
var asyncIterable = {
[Symbol.asyncIterator]: asyncIterator
};
(async function() {
for await (const item of asyncIterable) {
console.log(item);
// 1 2
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment