How to declare global variables when using the strict mode pragma
<p>It's considered good practice to use a self-invoking function to wrap strict mode compliant code, often called the strict mode pragma:</p>

<pre><code>(function(){
  "use strict";
  // Strict code here
}());
</code></pre>

<p>My question is how to declare global variables in this case? Three alternatives that I know of today:</p>

<p>Alternative 1:</p>

<pre><code>var GLOB = {};

(function(){
  "use strict";
}());
</code></pre>

<p>Alternative 2:</p>

<pre><code>(function(){
  "use strict";
  window.GLOB = {};
}());
</code></pre>

<p>Alternative 3:</p>

<pre><code>(function(win){
  "use strict";
  win.GLOB = {};
}(window));
</code></pre>

<p>Any preferences and motivations? Other options?</p>
