> Because you are setting a variable at the document level and not inside a
> function you dont need to var it.
Ok... I would agree with the "don't need to" for global variables (but
it would make no difference). But for local variables I would say yes
to ensure you don't accidentally create or access a global variable:
as in http://paste.mootools.net/f6084cb3f

> Basically when you var a variable it becomes scoped and is only accessible
> from the function you have set it in.
>From what nutron wrote I think it is from the function *and other
functions declared within that function*...?

@Steve:
Sorry if this is slightly annoying now, but I'm still unclear by why
you wouldn't do what I suggested in my original post in this topic...?

Michal.

Reply via email to