Process Lifecycle · Level 3 of 8

The doors are shut

An 'exit' listener that tries to set a timer.

process.on('exit', () => {  console.log('exit');  setTimeout(() => console.log('never'), 0);  console.log('still in exit');});console.log('main done');

1. Predict the output

Tap the lines in the order you think they print.

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