function Foo1(){
this.name1 = '1';
}
function Foo2(){
this.name2 = '2';
}
Foo2.prototype = new Foo1();
function Foo3(){
this.name = '3';
}
Foo3.prototype = new Foo2();
var foo3 = new Foo3();
console.dir(foo3);

各位帮忙分析下,为什么箭头指向的地方打印出来不是Foo2而是Foo1,这是什么原理?
慕妹3146593
慕村225694
aluckdog
随时随地看视频慕课网APP
相关分类