What does "return this" do within a javascript function?
<p>i wonder, what does "return this" do within a javascript function, what's its purpose?
supposing we have the following code:</p>

<pre><code>Function.prototype.method = function (name, func) {
  this.prototype[name] = func;
  return this;
};
</code></pre>

<p>What does "return this" do inside of a function?</p>

<p>I know what code above does, and what is the use of "this" keyword. I just don't know what "return this" does inside of a function.</p>
