Lesson 2 · Web Explorer
Making something happen on click.
Two chapters ago you built a <button>, clicked it, and nothing happened. You were told that was normal.
Time to fix it.
A click event in JavaScript is the same idea as when this sprite clicked in Scratch: when this happens, run these instructions. Only the writing has changed.
6 more parts in this lesson
Walkthroughs, code labs, mini-games and the checkpoint quiz unlock when you buy the course.