原型链的一个题目

winter的一个题目  

function Class(){
}
Class.prototype.__proto__.prop
=1;
Class.prototype
=new Class;
alert((
new Class).prop);

这个题目,请思考一下,对象寻找属性的过程是怎么样的。
也不会这么解释,用图说明过程。


所以  (new Class).prop=>(new Class).__proto__.__proto__.__proto__.prop

原文地址:https://www.cnblogs.com/lunalord/p/2045596.html