Javascript Global Objects
<p>Often I see a global object defined in javascript code to act as a namespace.</p>

<pre><code>var MyNS = {a: function() {}, ... };
</code></pre>

<p>But sometimes, I see people leave off the "var" keyword like</p>

<pre><code>MyNS = {a: function() {}, ...};
</code></pre>

<p>I believe in web browsers if you do not define a variable with var, it is put in the window object, which acts as a global namespace. Since it saves a few bytes of text by not using "var" is there a reason to use the keyword <em>for this specific purpose</em> ?</p>
