function Q() {
this.subproperty = false;
this.getSuperValue = function() {
return this.property;
}
}
function QQ() {
this.property = true;
}
Q.prototype = new QQ();
var instance = new Q();
console.log(instance.getSuperValue()); // true
这里为什么输出 true
呢?
false
不是更近一点吗?
因为你写错了啊。
应该是