Run ❯
Get your
own
website
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
JavaScript addEventListener()
This example uses the addEventListener() method to attach a click event to a button.
Try it