Home & blog

Tag: promises

Introducing Promise.any()

2 Aug 2020 promises

Meet Promise.any(), which is supported by the just-released Firefox 79. It's like Promise.race(), except it listens only for the first promise to be fulfilled, not merely resolved either way.

Resolving JavaScript promises from outside

16 Feb 2020 promises

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 acync/await part 1: How we got here

13 Oct 2019 promises

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

31 Jul 2019 promises

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 Promises part 1: Meet promises

28 Jun 2019 promises

Promises a great way to write shallow, readable code that looks synchronous but actually hides away asynchronous operations. In this first of three articles I'll be showing you how they work, and what problem they solve.