function Person(name, age) { this.name = name; this.age = age; } Person.prototype.say = function() { console.log(this.name); } function Tom(name, age) { Person.apply(this, arguments) } Tom.prototype = Object.create(Person.prototype); var tom1 = new Tom('ngnice', 10); tom1.say(); console.log(tom1) ; console.log(tom1 instanceof Tom); console.log(tom1 instanceof Person);