<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-git.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Remove a specific value from an array using jQuery.</title>
</head>
<body>
</body>
</html>
JavaScript Code:
var y = ['Red', 'Green', 'White', 'black', 'Yellow'];
var remove_Item = 'White';
console.log('Array before removing the element = '+y);
y = $.grep(y, function(value) {
return value != remove_Item;
});
console.log('Array after removing the element = '+y);
HTML Code :
JavaScript Code: