Re: [jslint] /*global */
- On Sun, May 31, 2009 at 7:32 PM, Douglas Crockford <douglas@...>wrote:
>> ... it is best to explicitly use var to declare all global variables ...Can you please explain why in more detail? Could not declaring the same
variable more than once could also lead to confusion? I think when most
people see the var statement they assume it's the primary declaration of
[Non-text portions of this message have been removed]
- --- In email@example.com, "pauanyu" <pcxunlimited@...> wrote:
> "name" needs to be writable. It has no value by default,Which do you think is more likely, that a program wants to change the global name, or that a var name declaration in a function was forgotten? We won't get an implied global warning, but at least we can get a read only warning. I think that is the more useful default.
> but you can assign a string to it, indicating the name of
> the window/tab.