Array.prototype.remove = function (idx) {
return this.splice(idx, 1); // The second parameter is the number of elements to remove.
}