Welcome to the Intro to Events lab!
In this lab, youβll learn how JavaScript makes web pages interactive by responding to user actions.
- What events are and why they matter
- How to listen for events using
addEventListener() - How to use callback functions to handle events
- How to access details from the event object
- Practical examples with click, input, and mouse events
| Folder / File | Description |
|---|---|
/lesson/README.md |
Explanations and learning materials |
/lab/index.html |
HTML page to run your exercise |
/lab/exercise.md |
Exercise instructions |
/lab/exercise.js |
Starter JS file for the exercise |
/lab/solutions.js |
Completed solutions (available in the solutions branch) |
- Open
lesson/README.mdto review the concepts. - Open
lab/exercise.mdto see your exercise tasks. - Edit
lab/exercise.jsto complete the exercise. - Open
lab/index.htmlin your browser to test your code. - When finished, compare your work with the
solutions.jsfile in thesolutionsbranch.