title: Reindexing an array
body: <p><a href="http://jsfiddle.net/borayeris/jcqwj/" rel="nofollow noreferrer">Here</a> is my example.</p>
  <p>Can you tell me how can I make the array have consecutive keys? I want to reindex my array.</p>
  <p>Currently I have:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var testArray = new Array();
  testArray[3]="qwerty";
  testArray[7]="asdfgh";
  testArray[13]="zxcvbn";
  
  console.log(testArray);</code></pre>
  </div>
  </div>
  </p>
  <p>But I'd like to get the values at indices 0, 1 and 2 (and so on):</p>
  <pre><code>[&quot;qwerty&quot;, &quot;asdfgh&quot;, &quot;zxcvbn&quot;]
  </code></pre>