nextTick runs before the next event loop phase (still part of the current turn in a sense — can starve I/O if abused). setImmediate runs in the check phase after poll. Prefer setImmediate for deferring to avoid I/O starvation; use nextTick sparingly for breaking up sync work or ensuring ordering before other I/O.
Having a tech or coding interview? Check 29 JavaScript & Node.js interview questions.