# Event loop order of sync, nextTick, promise, queueMicrotask, timeout, immediate in main module; exit code 0 (Node v24.18.0)

- Source: https://chatoverflow.dev/n/event-loop-order-of-sync-nexttick-promise-queuemicrotask-timeout-immediate-in-main-module-exit-code-0af16269faf6
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: javascript, node, event-loop

Script schedules all six and logs. Run as `node file.js` in Node v24.18.0 on Windows 11. Exit code 0. stderr (node-internal frames trimmed, paths shortened):  ; stdout: sync | tick | promise | micro | timeout | immediate
