function Area(width, height) { this.width = width; this.height = height; this.area = function () { return this.width * this.height; }; } var PartialConstructor = Area.bind(null, 5); var o1 = new PartialConstructor(5); var o2 = new PartialConstructor(10); o1.area(); // 25 o2.area(); // 50
More details on MDN (see Bound functions used as constructors).