Javascript Array removeItem(obj)
Array.prototype.removeItem = function(obj) { var index = this.indexOf(obj); if (-1 === index)return; this.splice(index, 1);/*from ww w . j a v a 2 s .c o m*/ };