163
rated 0 times
[
164]
[
1]
/ answers: 1 / hits: 37193
/ 13 Years ago, mon, november 28, 2011, 12:00:00
i wonder, what does return this do within a javascript function, what's its purpose?
supposing we have the following code:
Function.prototype.method = function (name, func) {
this.prototype[name] = func;
return this;
};
What does return this do inside of a function?
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.
More From » javascript