title: Why isn't the value in my variable (totalSubs) permanently changed with the new assignment after the runSubs funtion?
body: <p>When the page is reloaded, totalSubs returns back to its original value of 10. Why is this?</p>
  <pre><code>var totalSubs = 10;
  window.onload = function getSubs() {
  document.getElementById('subsNo').textContent= totalSubs;
  
  }
  
  function runSubs() {
  var subsNo = Number(document.getElementById('subsNo').textContent);
  var NewSubsNo = 0;
  NewSubsNo = subsNo + 1;
  document.getElementById('subsNo').textContent= NewSubsNo;
  return NewSubsNo; 
  }
  
  totalSubs = runSubs(totalSubs);
  
  &lt;input type=&quot;submit&quot; value=&quot;Subscribe&quot; style=&quot;width:200px; height:60px; font-size: 2.0rem;&quot; onclick=&quot;runSubs()&quot;  onload=&quot;getSubs()&quot; /&gt;
  
  &lt;p id=&quot;subsNo&quot;&gt; &lt;/p&gt;
  </code></pre>
  <p>Backend:</p>
  <pre><code>var http = require('http');
  var fs = require('fs'); 
  http.createServer(function (req, res) {   
    fs.readFile('MobileUI.html', function(err, data) {     
      res.writeHead(200, {'Content-Type': 'text/html'});
    res.write(data);
    return res.end();
    });
  }).listen(8080);
  </code></pre>