function doubleit() {
  this.value = this.value*2;
}

function Doubler() {
  this.value=0;
  // method definition:
  this.double = doubleit;
}