For instance:
var myObj={ myValue="hola", asMember=function(){ alert( this.myValue ); } }; myObj.asMember();
So the question is, can I rewrite asMember so that it can be called with a global alias and not mention myObj at all? He realized that if I define him:
asMember=function(){ alert( myObj.myValue ); }
it will work, but in my case, mentioning myObj unacceptable even inside the function itself (because myObj can be reassigned later, but asGlobal will not change and will continue to work)
source share