title: Remove an element from an array in JavaScript with slice or spread
body: <p>I have been watching the video on redux from Dan Abramov <a href="https://egghead.io/lessons/javascript-redux-avoiding-array-mutations-with-concat-slice-and-spread" rel="noreferrer">avoiding-array-mutations</a> and I have worked out how to use <code>slice</code> to remove an element from an array by id, returning the new array without mutation.</p>
  
  <pre><code>var arrayOld = ['apple', 'orange', 'fig']
  var index = arrayOld.indexOf('orange')
  var arrayNew = arrayOld.slice(0,index).concat(arrayOld.slice(index + 1))
  // ['apple', 'fig']
  </code></pre>
  
  <p>I was wondering how I would do the same using <code>es6 spread</code> syntax?</p>
  
  <p>Also I am wondering why there is not a simpler way: e.g. a helper function in es6 to do this, something that works as simply as the concat method, where you could just pass in the id of the element to remove and it returns the new array, so basically splice but without the mutation.</p>