Call "process.nextTick" to ensure an function is exectued directly after all code surrounding it look at the following link to get to know on why this needed: https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick (read full documentation)
Call "process.nextTick" to ensure an function is exectued directly after all code surrounding it look at the following link to get to know on why this needed: https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick (read full documentation)