title: How to add 1 to a javascript variable by clicking a button?
body: <p>I have very little experience with writing javascript and I need help desperately. I need to make so that when a button is clicked the score goes up by one similar to how the cookie clicker game works this is for an Assignment, the end product is to be a game similar to the cookie clicker game.</p>
  
  <p>this is the code I have so far;</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
      &lt;title&gt; Assignment &lt;/title&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;header&gt;
          &lt;strong&gt;Don't Touch The Button&lt;/strong&gt;
      &lt;/header&gt;
  
      &lt;div class="game-object"&gt;
          &lt;script type="text/javascript"&gt;
              var clicks = 0;
          &lt;/script&gt;
          &lt;button type="button" onClick ="clicks++" id="push"&gt; NO. &lt;/button&gt;
      &lt;/div&gt;
  </code></pre>