function Human(name, age, sex){ this.name = name; this.age = age; this.sex = sex; } Human.prototype.toString = function() { return this.name + " is " + this.age + " years old"; } function Superman(name, age, power) { this.name = name; this.age = age; this.power = power; } Superman.prototype = new Human(); Superman.prototype.showPower = function() { return "Superman can " + this.power; } var superMan = new Superman('Clark Kent', 30, 'fire laser beam'); /* Clark Kent is 30 years old Superman can fire laser beam */ console.log(superMan.toString()); console.log(superMan.showPower());