Array.prototype.member = function (x) {
  for (var i=0; i<this.length; i++) {
    if (this[i] == x)
      return true;
  }
  return false;
}

Array.prototype.remove = function (i) {
  var result = this[i];
  for (var j=i; j<this.length-1; j++) {
    this[j] = this[j+1];
  }
  this.pop();
  return result;
}


