// test for array remove // note: array.remove does not exist in the JavaScript standard Array.prototype.remove = function(x) { var idx = this.indexOf(x); if (idx<0) return; // not in array var l = this.length; for (var i=idx+1;i