Level 13

Chains take turns

Two promise chains, two steps each. Does one chain finish first?

Promise.resolve()  .then(() => console.log('a1'))  .then(() => console.log('a2'));Promise.resolve()  .then(() => console.log('b1'))  .then(() => console.log('b2'));

1. Predict the output

Tap the lines in the order you think they print.

  1. 1…
  2. 2…
  3. 3…
  4. 4…