Level 26

Ticks first, as a group

nextTick and promise calls, written alternately.

process.nextTick(() => console.log('t1'));Promise.resolve().then(() => console.log('p1'));process.nextTick(() => console.log('t2'));Promise.resolve().then(() => console.log('p2'));

1. Predict the output

Tap the lines in the order you think they print.

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