Lesson 11: Events, User Interaction and Debugging in JavaScript
What makes a previously silent web page react when a button is pressed? Lesson 10 showed that JavaScript can select DOM elements and change them; event listeners add a trigger for responsive behaviour. The central idea is event-driven programming: the browser reports an occurrence, then JavaScript responds instead of repeatedly rerunning the whole programme while waiting.
