title: Alternative to array.splice in JavaScript
body: <p>I am currently working on a project where I store numeric values in a JS array. After some changes it should be removed again. I currently use the array.splice method like this:</p>
  
  <pre><code>function removeA(arr, element) {
      var index = arr.indexOf(element);
      if (index &gt;= 0) {
          arr.splice(index, 1 );
      }
      return arr;
  } 
  </code></pre>
  
  <p>But this seems to give me issues on Safari. This piece of code works in every browser, like Chrome, Firefox, Opera. But not on Safari. It even works in the Technical Preview of Safari.</p>
  
  <p>Does anyone have an alternative? </p>
  
  <p>Thanks in advance :)</p>