π INDEX
LOADING ENGINE...
JS Events
Learn to handle interactivity on the web.
events.js
β‘
Waiting for interaction...
ADA:
Events are actions that occur in the browser, like a click or a key press. We use addEventListener to 'listen' for these occurrences.
Mission: The First Click
Write a listener that listens for the "click" event and uses a console.log inside.
AI Feedback:
> Waiting for code (e.g., btn.addEventListener...)
Event Glossary
click
Fires when a mouse button is pressed and released.
input
Fires when the value of an <input> changes.