title: Click Counter not working
body: <p>This is a super basic counter which just counts the button clicks. Below is the body of my html.</p>
  
  <pre><code> &lt;body&gt;
      &lt;div class="wrapper" &gt;&lt;button id="but"&gt; Click&lt;/button&gt;&lt;/div&gt;
      &lt;h2&gt;&lt;div class="counter"&gt; Counter: &lt;span id = "countNum"&gt; 0 &lt;/span&gt;&lt;/div&gt;&lt;/h2&gt;
      &lt;script type="text/javascript"&gt;
          var button = document.getElementById('but');
          var counter = document.getElementbyId('countNum');
          var count = 0;
          button.onClick = function() {
              count += 1;
              counter.innerHTML = count;
          };
      &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>However, there is simply no change on my counter when I click the button. I've tried placing output statements in the start of the script but they don't show up either. Have I placed it wrong? Is it an error with my code?</p>
  
  <p>I've gone through all the similar posts but cannot figure out my error.</p>