Activity 01
Paired Programming: Click Event Basics
Pairs build a simple webpage with three buttons, each triggering a different response (change text, change color, show a hidden element). One partner drives the code while the other navigates, then they switch after completing the first button. They compare which event listeners required the most debugging and why.
Explain the fundamental concepts of event-driven programming.
Facilitation TipDuring Paired Programming: Click Event Basics, circulate to ensure each pair attaches the event listener to the correct element and sees the immediate response in the browser console or webpage.
What to look forProvide students with a short code snippet that includes an event listener for a button click. Ask them to write down: 1. What event is being listened for? 2. What will happen when the event occurs? 3. What is the name of the function that will run?