Javascript Remove Element in Array Using jQuery

Berikut adalah contoh cara menghapus element dari javascript array menggunakan jQuery

[code language=”javascript”]
var y = [1, 2, 2, 3, 2]
var removeItem = 2;

y = jQuery.grep(y, function(value) {
return value != removeItem;
});
[/code]

http://stackoverflow.com/questions/3596089/how-to-remove-specifc-value-from-array-using-jquery

Chandra Oemaryadi has written 244 articles

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>