//Perfume is bad 06-07-19 TKS: Linzi, provide a place for everyone to communicate and share
var Class = {
create: function() {
return function() {
this .initialize.apply(this, arguments);
}
}
}
can be rewritten as follows: it may be clearer:
var Class={
create:function( ){
return cls_initfunc
}
}
var cls_initfunc = function()
{
this.initialize.apply( this,arguments);
}
//The create method of the above Class object obviously returns an object construction function
//At the same time, execute the this.apply method in the component function to initialize the object
//This parameter is used for replacement Object, arguments are the parameters accepted by the initialize function. By executing " " (this, arguments);
}
obj.prototype={
initialize:function(){
//do ur init in here
},
,
}