Try the event loop code for yourself and see how modifying the loop timing or moving items around affects the output to console. run node ordered.js to run the eventloop in order file. run node random.js to run the eventloop out of order file.