title: Is it an antipattern to set an array length in JavaScript?
body: <p>Is it bad to use code like:</p>
  
  <pre><code>var a = [1,2,3,4];
  a.length = 2; // 3 and 4 are removed
  </code></pre>
  
  <p>Does it have decent browser support? Do the removed values get garbage collected properly?</p>