1 of 1 ·Variables & events

Lesson 1 · Web Explorer
Storing values and reacting to clicks.
Make the Page Interactive
JavaScript can react to a click. Run a button that changes a message. Change only the message first; build a counter once you can explain the click action.
Click to zoomJavaScript looks intimidating and isn't, because you already know what it does.
In Scratch you used variables to hold a score. JavaScript has variables. In Scratch you used events to react to clicks. JavaScript has events. In Scratch you used if/else to make decisions. JavaScript has if/else.
Same ideas. Typed instead of dragged. The only genuinely new thing is that you must spell everything correctly, because there are no blocks to snap.
10 more parts in this lesson
Walkthroughs, code labs, mini-games and the checkpoint quiz unlock when you buy the course.