function remove(array, element) {
	const index = array.indexOf(element);

	if (index !== -1) {
		array.splice(index, 1);
	}
}
Removes the given element from the array.
@param {Array} array The source array to remove.
@param {any} element The target item to remove.
@returns {void}