one Introduction 1.1 Advice for Software Architects 1.2 Software Architecture as a Discipline 1.3 Design Patterns and Software Architecture 1.4 Conclusions 1.5 Exercises two Software Architecture: Basic Training 2.1 Software Paradigms 2.2 Open Syste
es5的构造函数前面如果不用new调用,this指向window,对象的属性就得不到值了,所以以前我们都要在构造函数中通过判断this是否使用了new关键字来确保普通的函数调用方式都能让对象复制到属性
function Person( uName ){
if ( this instanceof Person ) {
this.userName = uName;
}else {
return new Person( uName );
}
}
Person.protot