title: Changing a Variable Out of Scope?
body: <p>Is there any way to change a variable while out of scope? I know in general, you cannot, but I'm wondering if there are any tricks or overrides. For example, is there any way to make the following work:</p>
  
  <pre><code>function blah(){
   var a = 1
  }
  a = 2;
  alert(blah());
  </code></pre>
  
  <p>EDIT (for clarification):</p>
  
  <p>The hypothetical scenario would be modifying a variable that is used in a setInterval function which is also out of scope and in an un-editable previous javascript file. It's a pretty wacky scenario, but it's the one I intend to ask about.</p>