title: Should I use window.variable or var?
body: <p>We have a lot of setup JS code that defines panels, buttons, etc that will be used in many other JS files.</p>
  
  <p>Typically, we do something like:</p>
  
  <p><strong>grid.js</strong></p>
  
  <pre><code>var myGrid = .....
  </code></pre>
  
  <p><strong>combos.js</strong></p>
  
  <pre><code>var myCombo = .....
  </code></pre>
  
  <p>Then, in our application code, we:</p>
  
  <p><strong>application.js</strong></p>
  
  <pre><code>function blah() {
      myGrid.someMethod()
  }
  </code></pre>
  
  <p><strong>someother.js</strong></p>
  
  <pre><code>function foo() {
      myCombo.someMethod();
      myGrid.someMethod();
  }
  </code></pre>
  
  <p>So, should we be using the <code>var myGrid</code> or is better to use <code>window.myGrid</code></p>
  
  <p>What's the difference?</p>