Describe the event loop in JavaScript and how it enables non-blocking behavior.
The event loop is the mechanism that allows asynchronous operations in JavaScript. It continuously checks the message queue for new events and executes the callback functions associated with these events, allowing non-blocking behavior. This ensures that the program remains responsive to user interactions and other events.