I run in to something that illustrates how I clearly don\'t get it yet.
Can anyone please explain why the value of \"this\" changes in the following?
Just do the following:
var MyFunc = function(){ var self = this; alert(self); var innerFunc = function(){ alert(self); } innerFunc(); }; new MyFunc();
This way self will always mean this, irrespective of where you're calling it from, which is usually what you want.