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,这是什么原理?
添加回答
举报
0/150
提交
取消