Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

apply js

Function.prototype.construct = function(aArgs) {
  let oNew = Object.create(this.prototype);
  this.apply(oNew, aArgs);
  return oNew;
};
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #apply #js
ADD COMMENT
Topic
Name
8+8 =