src/array.js
function removeAll( arr, searchElement, fromIndex ){
	var r,
		pos = arr.indexOf( searchElement, fromIndex );

	if ( pos > -1 ){
		r = removeAll( arr, searchElement, pos+1 );
		r.unshift( arr.splice(pos,1)[0] );
		
		return r;
	} else {
		return [];
	}
}
function removeAll( arr, searchElement, fromIndex ){
	var r,
		pos = arr.indexOf( searchElement, fromIndex );

	if ( pos > -1 ){
		r = removeAll( arr, searchElement, pos+1 );
		r.unshift( arr.splice(pos,1)[0] );
		
		return r;
	} else {
		return [];
	}
}
function removeAll ( arr , searchElement , fromIndex ) { var r , pos = arr . indexOf ( searchElement , fromIndex ) ; if ( pos > - 1 ) { r = removeAll ( arr , searchElement , pos + 1 ) ; r . unshift ( arr . splice ( pos , 1 ) [ 0 ] ) ; return r ; } else { return [ ] ; } }
Search an array for an element and remove all instances of it, starting at the begining or a specified location

@function remove
@param {array} arr An array to be searched
@param {*} searchElement Content for which to be searched
@param {integer} fromIndex The begining index from which to begin the search, defaults to 0
@return {integer} number of elements removed
Search an array for an element and remove all instances of it starting at the begining or a specified location