What makes life valuable is that it doesn't last forever,what makes it precious is that it ends.
JavaScript 圣杯模式:
1234567
function inherit(Target,Origin){ function F(){}; F.prototype = Origin.prototype; Target.prototype = new F(); Target.protype.constuctor = Target; Target.prototype.uber = Origin.prototype;}
JavaScript instanceof:看 A 的对象原型链上有没有 B 的原型。
看 A 的对象原型链上有没有 B 的原型。
1
A instanceof B
Keep It Real