Define local variable in function? I have an object like this

initialize : {  
    method : function() {
        this.__. //--&gt; do another thing
        ... //--&gt; so many
        this.__.params. //--&gt; do another thing
        ... //--&gt; so many
    }           
}


and the method of this object call by another function.  As you can see, we have many lines that refer to this.__ and this.__. params, and for preventing this, I declare local variables T and P like below

initialize : {  
    method : function() {
        var T = this.__, P = T.params;
        T. //--&gt; do another thing
        ... //--&gt; so many
        P. //--&gt; do another thing
        ... //--&gt; so many
    }           
}


as I mentioned before the method calls by another function called caller.

Is it possible to not declare locale variables in the method function and instead define them in scope of the caller function and pass it to the method ?
Not much to review ;)


As @Dave mentioned, __ is a bit of an odd named, for sure it does not give away what it does
You might consider storing __.params separately in this.parameters or this.options


I would need more code to give deeper, insightful comments ;)