Search for a command to run...
Nondeterministic at the top level, guaranteed inside an I/O callback
The main module runs
Synchronous work first, as always — the event loop has not started yet.
Top level (order not guaranteed)
1console.log('main start');//output: 12 3setTimeout(() => console.log('setTimeout 0'), 0);4setImmediate(() => console.log('setImmediate'));5 6console.log('main end');