title: Remove object in array using filter and splice which one is best approach in JavaScript?
body: <p>Hi I delete an object in an array using two approaches:- 
  splice and filter.</p>
  
  <p>splice code here:- </p>
  
  <pre><code>(this.myArray).splice((this.myArray).indexOf(myobject), 1);
  </code></pre>
  
  <p>filter code here:- </p>
  
  <pre><code>(this.myArray).filter(obj =&gt; obj !== myobject);
  </code></pre>
  
  <p>Please tell us differences between both and which one is the best approach? </p>