var index = array.indexOf(item);
if (index !== -1) {
array.splice(index, 1);
}
let values = [1,2,3,4,5];
let evens = values.filter(v => v % 2 == 0);
alert(evens);
var y = [1, 2, 2, 3, 2]
var removeItem = 2;
y = jQuery.grep(y, function(value) {
return value != removeItem;
});