Tag: async
When the JavaScript Promises specification was released, one of the first questions that got asked (and is still asked) was: but how do I resolve them from outside, a la jQuery deferred objects? That's not how they're intended to work, but it is possible.
In the first article in this series we looked at the history and run-up to the game-changing async/await
combo. In this article we'll get down to using it and seeing precisely how it works.
ECMAScript 2016's async/await
combo really was a game-changer when it comes to writing shallow, synchronous-looking code that hides away asynchronous operations, and they really took promises to a new level. Let's meet them!
Rounding off this three-part series on JavaScript promises, in this article we'll look at promise events, combining promises with ECMAScript 2017's async/await
combo, plus some of the standard APIs that use or depend on promises.
Wrapping up my three-part guide to JavaScript generators, in this article we'll take a look at how generators compare with the later async/await
combo, with which they share much in common, and also see how generators can delegate tasks to other generators.
In this, the second part in my three-part guide to JavaScript generators, we'll see how generator functions lend themselves particularly to asynchronous situations - but hiding that asynchronicity away behind synchronous-looking code flows.
In this article I'll be taking a look at JavaScript iterables, iterators, and the two protocols that govern them. Iterators control how an object can be iterated over, while an iterable can be fed to constructs such as for-of
or spread syntax.