return this javascript

JavaScript
Function.prototype.method = function (name, func) {
  this.prototype[name] = func;
  return this;
};
Source

Also in JavaScript: