JavaScript Tutorial

process.nextTick()

Schedules a callback to execute after the current operation but before the event loop continues.

console.log('sync');
process.nextTick(() => console.log('next tick'));
console.log('post sync');