title: Object pointers suddenly becoming undefined
body: <p>Is Javascript known to make object pointers undefined all of a sudden with no warning whatsoever? </p>
  
  <p>I am passing three arrays of object pointers into a function and after a call to another function where one of them is provided as a parameter, another one of them becomes undefined after the call. </p>
  
  <p>I have tried to pass that one into the other function as well and check at each step if anything happens to it, but nothing happens until control is returned from that function (with the returning of another array of object references having been built in that function).</p>
  
  <p>I have also tried to clone it and and copying back from the clone after the call, still the result is undefined. Weirdest of all, I tried to build it again, inserting a call to the function where it is built after the call to the mentioned other function. Still the same.</p>
  
  <p>The function where this happens is below. Note the identical alerts before and after the call to drawing. The first one works, the other not.</p>
  
  <pre><code>function play(skaters,nations,distances)
  {
      var pairs = [];
      for(i=0;i&lt;distances.length;i++)
      {
      alert(distances[i].value + ' ' + distances[i].unit + ':');
      pairs = drawing(skaters,i);
      try{
      alert(distances[i].value + ' ' + distances[i].unit + ':');
      } catch(err) {alert(err.message)}
      for(j=0;j&lt;pairs.length;j++) 
      displayPair(pairs[j],distances[i],skaters,nations);
  //  displayDistance(distances[i],skaters,nations);
      }
  //  displayFinal(nations); 
  }
  </code></pre>