It's a best practice to use var a = this to avoid the scope leak that you
mentioned.

Cheers,
-Jonathan


On 12/18/07, Joel Stein <[EMAIL PROTECTED]> wrote:
>
>
> > Also you might want to do "var a = this" so that it doesn't conflict
> with any global variables.
>
> Thanks, Josh.  That's what I suspected.  As far as the "var a =
> this"... is that because using "var" to declare the variable makes its
> scope within the function alone, or is the "var" unnecessary?
>

Reply via email to