How is it that I can add properties to a closure in anonymous self executing function?
<p>why is it that when I do this:</p>

<pre><code>x = 5
(function bla(varX){
    varX = 7; console.log(x); //7
})(x);
console.log(x); //5
</code></pre>

<p>the <code>x</code> doesn't change, since it's in a closure if I understand correctly,
but here:</p>

<pre><code>x = {a:5}

(function bla(varX){
    varX.a = 7; console.log(varX.a);
})(x)
console.log(x.a); //7
</code></pre>

<p>Why does <code>x.a</code> gets overwritten and <code>x</code> doesn't?</p>
