const index = array.indexOf(item);
if (index !== -1) array.splice(index, 1);
var index = array.indexOf(item);
if (index !== -1) array.splice(index, 1);
var arr = ['bill', 'is', 'not', 'lame'];
arr.splice(output_items.indexOf('not'), 1);
console.log(arr) //returns ['bill', 'is', 'lame']
var index = array.indexOf(item);
if (index !== -1) {
array.splice(index, 1);
}
Array.prototype.spliceAll = function (criteria) {
return this.filter(e=>e !== criteria) }
let newArray = myArray.spliceAll('removeThisString')
/*//*\_AS A PROTOTYPE METHOD |OR| AS AN ARROW FUNCTION_/|**/
const spliceAll = (a,c) => a.filter(e=>e !== c)
let newArray = spliceAll(myArray, 'removeThisString')