1const index = myArray.indexOf(key, 0);
2if (index > -1) {
3   myArray.splice(index, 1);
4}1let foo_object // Item to remove
2this.foo_objects = this.foo_objects.filter(obj => obj !== foo_object);
31myArray.splice(index, 1); // insert index and then amount to remove 
2						  // from that index
31
2    
3    var ar = [1, 2, 3, 4, 5, 6];
4    
5    ar.pop(); // returns 6
6    
7    console.log( ar ); // [1, 2, 3, 4, 5]
8