When we talk about JavaScript being “event-driven”, it means that the output of the program is indicated by events, like user inputs (mouse clicks, pressing keys), and messages from other systems. It needs a catalyst in order to execute code. It can be thought of as a change from a neutral state to an excited state, like in chemistry.
In event-driven programs, there is a main loop that listens for events, and produces a callback loop when an event is detected. The program is able to identify events thanks to “event handlers”, also called subroutines or methods, and are designed to recognize specific events to respond to. Those event handlers have to be binded to the correct function so that they execute the corresponding code/actions.
Hello Catrina, I like how you described what it means to be event driven and how it applies to Java script, you explained it very well, including event handlers, I also love the picture you implanted as well! It fits into your description perfectly! Good Job!