title: How to add and remove to 2 variables
body: <p>im trying to add and remove to 2 different variables in a code for a incremental game.
  here is the code:</p>
  
  <pre><code>$("#autoPayCheckBuy").click(function () {
      if (totalClicks &gt;= 50) {
          totalClicks -= 50;
          totalMoneys += 50;
          $("#total_moneys").text(totalMoneys);
          $("#total_clicks").text(totalClicks);
      }
  });
  </code></pre>
  
  <p>and here is the code for the money/clicks:</p>
  
  <p>var totalClicks = 0;</p>
  
  <p>var totalMoneys = 100;</p>
  
  <p>sorry that i cant give a exact problem, i just cant find a problem in the code :(</p>