var Hello = (function(){ // constructor function Hello(name){ this._name = name; } // private method function say(message){ console.log(message + ', ' + this._name); } // public method function hello(){ say.call(this, 'Hello'); } Hello.prototype = { // constructor 修正 constructor: Hello, // 以下 public メソッド hello: hello }; return Hello; }()); var Animal = (function(){ function Animal(name){ this._nam