A good answer might be:
When you perform an action on a graphical component you
generate an event.
In event-driven programming the program responds to events.
The program responds to events that the user
generates in interacting with GUI components.
The order of events is controlled by the user.
How do you imagine that I wrote this web page:
- By writing the thousands of lines of code that display a button,
respond when it
is clicked, and display an "alert," or
- By using HTML to ask for some button objects that do what I want.