2009-08-16から1日間の記事一覧
hacker's /* test-inher-3-hacker.js */ // コンストラクタ var Point = function (x, y) { this.x = x; this.y = y; }; var PointPrototype = function () { this.moveTo = function (x, y) { this.x = x; this.y = y; }; this.toString = function () { re…
/* PointWithSecret.js */ var Point = function (x, y, secret_) { this.x = x; this.y = y; var secret = (secret_ || "confidence"); this.getSecret = function() { return secret; }; }; Point.prototype = { moveTo : function (x, y) { this.x = x; t…