Javascript closure
<p>Here is a code </p>

<pre>
var collection = (function (){
                    var x = 0;
                    return {
                        y : x,
                        get : function(){return x},
                        set : function(n) { x = n}                        
                    }
                  }());

collection.set(1000);
</pre>

<p>Could anybody explains me why
collection.y != collection.get() ?</p>

<p>Regards</p>

<p>Salvatore</p>
