SOURCE

function Parent () {
  this.name = 'parent';
  this.numbers = [1, 2, 3];
}

function Child () {
  Parent.call(this);
  this.type = 'child';
}

Child.prototype = Object.create(Parent.prototype);
Child.prototype.constructor = Child;

console.log(new Child())
console 命令行工具 X clear

                    
>
console