title: Find length of an array in jquery getting wrong result
body: <p>I have javascript code like below to get the size of an array,</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var testvar = [  ];
  testvar[1] = 2;
  testvar[200] = 3;
  alert(testvar.length);    //201</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong><a href="http://jsfiddle.net/Lj9p99sf/" rel="nofollow">Fiddle demo</a></strong></p>
  
  <p>But the code alerts <code>201</code> insted of getting the size <code>2</code>,Why?</p>
  
  <p><strong>I need to get the count of total elements in that array.</strong></p>