title: Unexpected result with work on js array
body: <p>I try delete excluded types from my object. And think in should work, but I don't understand, why 'company_accountant' still in the array.
  And mayby you can help me and advice more elegant way to search and delete excluded types?</p>
  
  <pre><code>var data = [
      {id: 1, type: "exempt_dealer"},
      {id: 2, type: "licensed_dealer"},
      {id: 3, type: "partnership"},
      {id: 4, type: "company"},
      {id: 5, type: "licensed_dealer_accountant"},
      {id: 6, type: "company_accountant"},
      {id: 7, type: "partnership_accountant"}
  ];
  
  var exclude_types = [
      'company_accountant',
      'licensed_dealer_accountant',
      'partnership_accountant'
  ];
  
  angular.forEach(data, function (value, key) {
      if(exclude_types.includes(value.type)){
          data.splice(key, 1);
      }
  });
  </code></pre>
  
  <p><strong>data</strong> should be: </p>
  
  <pre><code>data = [
      {id: 1, type: "exempt_dealer"},
      {id: 2, type: "licensed_dealer"},
      {id: 3, type: "partnership"},
      {id: 4, type: "company"}
  ];
  </code></pre>
  
  <p>but for some reason:</p>
  
  <pre><code>{id: 1, type: "exempt_dealer"},
  {id: 2, type: "licensed_dealer"},
  {id: 3, type: "partnership"},
  {id: 4, type: "company"},
  {id: 6, type: "company_accountant"}
  </code></pre>