Home & blog

Tag: async

Resolving ES6 promises from outside

16 Feb 2020 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.

JavaScript aync/await part 1: how we got here

13 Oct 2019 async

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!

JavaScript Promises part 3: Wrapping up

28 Jun 2019 async

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.

JavaScript generators part 3: Yet more generators

31 Mar 2019 async

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.

JavaScript generators part 2: Generators and asynchronicity

10 Mar 2019 async

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.

JavaScript iterators and iterables

1 May 2018 async

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.