title: Removing elements from JavaScript arrays
body: <p>I have the following array setup, i,e:</p>
  
  <pre><code>var myArray = new Array();
  </code></pre>
  
  <p>Using this array, I am creating a breadcrumb menu dynamically as the user adds more menu items. I am also allowing them to removing specific breadcrumb menu items by clicking on the cross alongside eatch breadcrumb menu item.</p>
  
  <p>Array may hold the following data:</p>
  
  <pre><code>myArray[0] = 'MenuA';
  myArray[1] = 'MenuB';
  myArray[2] = 'MenuC';
  myArray[3] = 'MenuD';
  myArray[4] = 'MenuE';
  </code></pre>
  
  <p>My questions are:</p>
  
  <p>a) In JavaScript, how can I remove element [1] from myArray and then recalculate indexes or is this not possible?</p>
  
  <p>b) If I don't want menu option MenuB, do I need to splice it to remove it?</p>
  
  <p>My problem is, if the user removes menu items as well as create news one at the end, how will the indexes to these elements be spreadout?</p>
  
  <p>I just want to be able to remove items but don't know how the array indexes are handled.</p>