🔍

# javascript

How to Implement an Event Bus in JavaScript

The Event Bus is usually used as a communication mechanism between multiple modules, which is equivalent to an event bus. One module sends messages, and other modules receive messages, which achieves the function of communication.