title: How do you increment a click counter on a button and make the button perform its original action?
body: <p>I'm trying to count how many times I click a button on a page and I can even do it via the Firefox console. My counter is incremented, but the button does not perform the original action. My code is as follows:</p>
  
  <pre><code>var button = document.getElementById("buttonid"),
    count = 0;
  button.onclick = function() {
    count += 1;
    console.log(count);
  };
  </code></pre>