// ベースクラス function A(){} A.prototype.name = 'Aです。'; A.prototype.age = 15; // サブクラス function B(){} B.prototype.name = 'Bです。'; B.prototype.job = 'Engineer'; B.prototype = new A(); // 検証 console.log(A.prototype); console.log(B.prototype);