6.6 Summary
In this chapter, you learned about the basic operation of event-driven programming in JavaScript. Among other things, you now know how to respond to user actions, whether mouse or keyboard interactions, form inputs, or other events that are triggered. The following are the most important points to remember from this chapter:
-
In event-driven programming, events are triggered that can be acted upon within the code.
-
In general, the code that responds to events is called an event handler or an event listener.
-
In JavaScript, you can define event handlers using HTML (HTML event handlers) or JavaScript (JavaScript event handlers), but event listeners can only be defined via JavaScript.
-
The advantage of event listeners over event ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access