โ† Ages 12+/Click Events
๐Ÿ“– Story

Click Events

Interactivity means listening. addEventListener waits for the user to click, then runs your function. This is how every button on the web works.

What you'll learn

Respond to a user click.

New command

button.addEventListener('click', () => { โ€ฆ })
๐Ÿ’ป Code Editorhtml
๐ŸŽฌ

Press Run Code to see your creation!

โฎ Previous lesson