title: Changing global Variable from within function
body: <p>Here im having a bit of an issue with this very simple script Ive written up. The aim for this script is to simply reduce the given number by one each time the button is clicked. I cannot appear to do this.. My global variable being the Number=100 doesnt appear to change, or change more than once.. Apologies for not being able to explain this well. 
  Here is the part im working on..:</p>
  
  <pre><code>&lt;script&gt;
    var Number = 100;        // Number i want changed and to keep changing each button click
    function outcome() {     // Button calls this function
      Number = Number - 1;   // Tries to change Global Number.. :/
    }
    document.write(Number);  // Has the Number written in the document
  &lt;/script&gt; 
  </code></pre>