Infogain Interview Question

Explain how javascript event loop works