title: Variable not accessible when initialized outside function
body: <p>When I use code like this, it works fine:</p>
  
  <pre><code>function removeWarning() {
      var systemStatus = document.getElementById("system-status");
      systemStatus.innerHTML = "";
  }
  
  function indicateInvalidUsername() {
      var systemStatus = document.getElementById("system-status");
      systemStatus.innerHTML = "Invalid username";
  }
  </code></pre>
  
  <p>However, when I then want to move the <code>systemStatus</code> to be a global variable, it doesn't work:</p>
  
  <pre><code>var systemStatus = document.getElementById("system-status");
  
  function removeWarning() {
      systemStatus.innerHTML = "";
  }
  
  function indicateInvalidUsername() {
      systemStatus.innerHTML = "Invalid username";
  }
  </code></pre>
  
  <p>What am I supposed to be doing here?</p>