Basically, what he is trying to do is call the constructor function for the object, which is the prototype of the current object.
Destruction:
this - current objectthis.constructor is the constructor property on the current object, which is almost certainly (but not necessarily!) inherited from its prototype. And therefore, it is possible (but not necessary) the function that created the object.this.constructor.prototype - The object assigned to this prototype property. (The object that will be assigned as the base prototype of the objects created if you call this function through new .)this.constructor.prototype.constructor - The function that created this object.
... and then we'll call apply on it to set this during the current call to this and use Array.prototype.slice to make a copy of the current arguments as a true array. (This last part is unnecessary, apply accepts everything that looks like an array, does not require true arrays. Thus, the code can just use arguments .)
source share