title: Javascript equation tag doesn't update text on webpage
body: <p>I'm having some trouble with some code of mine. I'm sure its a simple error, but i'm very new to html, js and jquery. I'm having some trouble with an equation which doesn't seem to be working. it could also be an issue with the text not updating with the variable.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var total = 0
  var othernumber = 0
  
  $(document).ready(function() {
    $("#id2").click(function() {
      if (total &gt;= 10) {
        othernumber++;
        total - 10;
        $("#othernumber").text(othernumber);
        $("#total").text(total);
      };
    });
  });
  
  $(document).ready(function() {
    $("#id").click(function() {
      total++;
      $("#total").text(total);
    });
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  
  &lt;head&gt;
    &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;h1 id="total"&gt;0&lt;/h1&gt;
    &lt;h3 id="othernumber"&gt;0&lt;/h3&gt;
    &lt;button id="id"&gt;add one&lt;/button&gt;
    &lt;button id="id2"&gt;add one when total &gt;= 10 and then subtract ten&lt;/button&gt;
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>I'm specifically having problems with this snippet of code.</p>
  <pre><code>$(document).ready(function() {
            $(&quot;#id2&quot;).click(function() {
              if (total &gt;= 10) {
                othernumber++;
                total - 10;
                $(&quot;#othernumber&quot;).text(othernumber);
                $(&quot;#total&quot;).text(total);
              };
            });
          });
  </code></pre>
  <p>it doesn't seem to want to subtract 10 from total, or maybe it just isnt updating the text. thanks in advance!</p>