You can use the splicing method
fruits.splice($.inArray("red", fruits), 1);
But this, of course, uses jQuery.
You can also use this extension:
Array.prototype.remove = function () { var what, a = arguments, L = a.length, ax; while (L && this.length) { what = a[--L]; while ((ax = this.indexOf(what)) != -1) { this.splice(ax, 1); } } return this; }
source share