title: Javascript date variable assignment
body: <pre><code>var date1 = new Date();  
  date1.setFullYear(2011, 6, 1);  
  
  // 2011-07-01, ok  
  console.log(date1);
  
  // set date2 the same date as date1  
  var date2 = date1;
  
  // ...
  
  // now I'm gonna set a new date for date2  
  date2.setFullYear(2011, 9, 8);
  
  // 2011-10-08, ok  
  console.log(date2);
  
  // 2011-10-08, wrong, expecting 2011-07-01  
  // I didn't assign a new date to date1  
  // WHY is date1 changed?  
  console.log(date1);
  </code></pre>