title: Cannot access a Javascript global variable inside the window object
body: <p>My understanding (Based on experience and <a href="https://stackoverflow.com/q/6349232/1175496">posts like this</a>)
  If my Javascript does this:</p>
  
  <pre><code>global_var = {'key' : 'value'}
  </code></pre>
  
  <p>Then I should be able to do this:</p>
  
  <pre><code>console.log(window.global_var)
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>console.log(window['global_var'])
  </code></pre>
  
  <p>I expect those things to actually log the object to my console <code>{'key':'value'}</code>. In fact both of the latter two statements print <code>undefined</code></p>
  
  <p>I know I can do this: </p>
  
  <pre><code>window.global_var = {'key' : 'value'}
  </code></pre>
  
  <p>But that's not what I want (just humor me)</p>
  
  <p>I've tried this from Javascript files loaded to the page.
  I've also tried from the Chrome Developer Console, both directly (repeating above), and also using <a href="https://stackoverflow.com/a/23829683/1175496">"Store as Global Variable"</a></p>
  
  <pre><code>=console.log({'key':'value'})
  VM1587:1 Object {key: "value"}
  undefined
  {I right-click on the Object logged above and choose "save as Global Variable"}
  temp1
  Object {key: "value"}
  window.temp1
  undefined
  </code></pre>
  
  <p>I am using Chrome Version 47.0.2526.106 m </p>