Morningstar interview question

Explain the flow of event loop in javascript