array.remove [method]

array.remove( var item[, bool strict[, bool all[, int from ]]] )

attepts to find and remove first or all item variables in array (depending on all), according to the rules specified in array.find(), returning the number of removed items

a = [ 5, 2, 6, 7, 8, 2 ];
a.remove( "7" ); // returns 1; a = [5,2,6,8,2]
a.remove( "6", true ); // returns 0; a remains unchanged
a.remove( 2, false, true ); // returns 2; a = [5,6,8]