Can I explicitly reference a JavaScript global variable that's been shadowed by a local with the same name?
<p>I've seen tons of posts about the difference between global and function scope in JavaScript, far too many to link here.  I've also seen my exact question <a href="http://stackoverflow.com/questions/10235973/modifying-global-variable-with-same-name-as-local-variable">asked about Python</a>.  So what I want to know is, how can I access a global variable when a "closer" scope also has a variable with the same name?</p>

<pre><code>var a = "global";
function b(){
  var a = "local";
  var magic = ...; // somehow put "global" in magic
  console.log(magic); // should print "global"
}
</code></pre>

<p><em>In browser only</em>, I figured out that you can use <code>window.a</code> to specify the global.  Is there anything that works server-side as well?</p>
