1814Re: Bad variable names
- Jan 25, 2011--- In firstname.lastname@example.org, "Ezequiel" <thehungerforce@...> wrote:
> Well, JSLint already has this.That's not true at all. var String inside of a function declares a local variable that can only be seen by the code you put into that function with it. That is nothing like redefining a primordial global variable.
> var String = '';
> => Problem at line 1 character 5: Redefinition of 'String'.
> JSLint doesn't see this as an issue if we do it inside a function, however.
> Whether you initialize that var inside or outside a function, it still has the same effect of redefining "String."
- << Previous post in topic Next post in topic >>