Step1: Create an array
Step2: Use the grep() method of jQuery, which takes parameters.
First parameter is array.
var x = [9, 10, 11,12,13,14,15]
var removeData = 12;
x = jQuery.grep(x, function(value) {
return value != removeData;
});
-----------------------------
Output:-
[9, 10, 11,13,14,15]
Step2: Use the grep() method of jQuery, which takes parameters.
First parameter is array.
var x = [9, 10, 11,12,13,14,15]
var removeData = 12;
x = jQuery.grep(x, function(value) {
return value != removeData;
});
-----------------------------
Output:-
[9, 10, 11,13,14,15]
0 comments:
Post a Comment