Is a separate closure instance created for each nested function?
<p>Apologies if my terminology is a little off... When a one function wraps another and a closure is created, is a new instance of the closure ("space in memory"?) created each time the outer function is called?</p>

<p>From my code here I believe the answer to be yes:</p>

<pre><code>(function(){
  var ob = {}, names=['one', 'two'], i=0;

  var outer = function(val){

    ob[names[i++]] = function(){
      return val;
    };

  };

  outer(3);
  outer(999);

  console.log(ob.one());
  console.log(ob.two());
})();
</code></pre>

<p>Given that the result is</p>

<pre><code>3
999
</code></pre>

<p>rather than</p>

<pre><code>999
999
</code></pre>

<p>it appears as if <code>ob.one</code> points to a different closure instance to <code>ob.two</code> -each with its own value for <code>val</code>.</p>

<p>Is it more than my terminology that's confused?</p>
