npm install
gulp serve && gulp watch
《JavaScript高级程序设计》 6.3.1 章 原型链:
function SuperType(){
this.property = true;
}
SuperType.prototype.getSuperValue = function(){
return this.property;
};
function SubType(){
this.subproperty = false;
}
// SuperType
SubType.prototype = new SuperType();
SubType.prototype.getSubValue = function (){
return this.subproperty;
};
var instance = new SubType();
alert(instance.getSuperValue());
//true
- 6.3 章阅读
- 图示手稿
- 动画尝试