title: Deleting array elements in JavaScript - delete vs splice
body: <p>What is the difference between using <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/delete" rel="noreferrer">the <code>delete</code> operator</a> on the array element as opposed to using <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/splice" rel="noreferrer">the <code>Array.splice</code> method</a>? </p>
  
  <p>For example:</p>
  
  <pre><code>myArray = ['a', 'b', 'c', 'd'];
  
  delete myArray[1];
  //  or
  myArray.splice (1, 1);
  </code></pre>
  
  <p>Why even have the splice method if I can delete array elements like I can with objects?</p>