text: function Vector(x, y) {
      this.x = x;
      this.y = y;
  }
  
  Vector.prototype.plus = function(otherVec) {
      return new Vector(this.x + otherVec.x, this.y + otherVec.y);
  }
  
  Vector.prototype.minus = function(otherVec) {
      return new Vector(this.x - otherVec.x, this.y - otherVec.y);
  }
  
  Object.defineProperty(Vector.prototype, "length", { get:
      function() { return Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2));
  }});
  
  console.log(new Vector(1, 2).plus(new Vector(2, 3)));
  // → Vector{x: 3, y: 5}
  console.log(new Vector(1, 2).minus(new Vector(2, 3)));
  // → Vector{x: -1, y: -1}
  console.log(new Vector(3, 4).length);
  // → 5
  