SOURCE

 // 使用Object.create实现继承
function Foo_a() {
	this.name = 'foo-a';
}
Foo_a.prototype.say = function() {
	console.log('i am' + this.name);
}

function Foo_b() {
	this.name = 'foo-b';
}
let temp_obj = Object.create(Foo_a.prototype, {});
Foo_b.prototype = temp_obj;
temp_obj.constructor = Foo_b;


var ins_b = new Foo_b();
console.dir(ins_b);

var ins_a = new Foo_a();
console.dir(ins_a);
console 命令行工具 X clear

                    
>
console