Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Click on button</title>
</head>
<body>
  <button id="myButton">Click me!</button>
  <script>
    var button = document.getElementById('myButton');
    button.addEventListener('click', processClick);
    
    function processClick(event) {
      console.log("Button clicked");
      
      // What is the event parameter?
    }
  </script>
  </body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
micbuffapro
0viewers