object function loop override javascript?
<p>i'm very confused about the following code : </p>

<pre><code> var x =[ {name : 'name1' , value : 15 },{name :'name2' , value: 60} ];
 var y = [[1,2,3] , [4,5,6]] ; 
     for(var t in y){
         x[t].myFun = function(){console.log(y[t])} ;
      }
 console.log(x[0].myFun()) ; 
</code></pre>

<p>shouldn't this code return  the first array in <code>y</code> why does it return the second array ?</p>

<p>here is a <a href="http://jsfiddle.net/minagabriel/y6yxZ/" rel="nofollow">jsFiddle</a></p>
