Quantcast
Viewing latest article 25
Browse Latest Browse All 47

Re: How to use the self with object-oriented javascript and closures

> "when using closures within an object, the this in the called function (in the above example, in the meow() function) is the window object."

That doesn't seem to make sense. If the "this" in the meow() function were the window object, 'this.theCatName' would be undefined.
Maybe you meant that the 'this' in the *anonymous* function is the window object?


Viewing latest article 25
Browse Latest Browse All 47

Trending Articles