Javascript Array pull(elem)
Array.prototype.pull = function(elem) { var i = this.indexOf(elem); if (i === -1)//w w w . j a v a 2s . c o m return; return this.splice(i, 1); };