var Point = (function() { // コンストラクタ var ctor = function Point(x, y) { // new なしで呼び出すとエラー if (!(this instanceof ctor)) throw new TypeError('Constructor cannot be called as a function.'); this.x = x; this.y = y; }; var proto = ctor.prototype = {}; proto.constructor = ctor; // 別名コンストラクタ ctor.from = (function(c) { c.prototype = proto; return c; }(function from(object) { if (!(this instanceof ctor)) t