title: Javascript namespacing convention
body: <p>wI'm unsure which is the better namespace convention to use.</p>
  
  <pre><code>var App = {}; // global variable, the root of our namespace
  (function() {
  
     App.something = function() {
  
     }
  
  })();
  </code></pre>
  
  <p>or</p>
  
  <pre><code>(function() {
  
     window.App = {}; //global variable, the root of our namespace
  
     App.something = function() {
  
     }
  
  })();
  </code></pre>
  
  <p>window.App and var App are both global variables so both conventions achieve the same outcome, but which is better?</p>