title: Removing an Index altogehter from a javascript array
body: <p>If i declare this</p>
  
  <pre><code>var data = [];
  data [300] = 1;
  data [600] = 1;
  data [783] = 1;
  </code></pre>
  
  <p>I have an array of length 784 but with only 3 defined items within it.</p>
  
  <p>Since splice(300,1) would delete the item and the index but would also shift every consecutive position, how can i delete the object in the index 300 from the array without altering the order of the array so when i use </p>
  
  <pre><code>for(var x in data)
  </code></pre>
  
  <p>it can correctly iterate only 2 times, on the indexes  600 and 783?</p>
  
  <p>i tried using <code>data[300] = undefined</code> but the index 300 was still iterated over.</p>