关于原型对象中this指向的问题困扰我好久了 求助求助!!!!
A_LVv 2018-05-02 06:01:25 function a (){
this.name="xioali";
}
a.prototype.sayname=function(){
return this.name;
}
let b=new a();
console.log(b.sayname());
先从b对象中找sayname没找到然后从a的原型对象中找。
a原型对象中this不是指向a原型对象吗,但是它没有name 那么最后输出xiaoli是从哪来的?