Loading ...
Sorry, an error occurred while loading the content.

[jslint] Re: Try to use a single 'var' statement per scope.

Expand Messages
  • Douglas Crockford
    ... could help ... Thanks, I get it now. I think it is a good suggestion.
    Message 1 of 5 , Aug 14, 2008
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "Arthur Blake" <arthur.blake@...>
      wrote:
      >
      > I think he's trying to ask if it is better to use this form:
      >
      > var x,y,z;
      >
      > versus
      >
      > var x;
      > var y;
      > var z;
      >
      > My opinion is yes, because it makes the script smaller and also
      could help
      > reinforce the fact that the var keyword is only at function scope.

      Thanks, I get it now. I think it is a good suggestion.
    • Fred Lorrain
      ... The new onevar option can now be used to that
      Message 2 of 5 , Aug 18, 2008
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...>
        wrote:
        >
        > --- In jslint_com@yahoogroups.com, "Arthur Blake" <arthur.blake@>
        > wrote:
        > >
        > > I think he's trying to ask if it is better to use this form:
        > >
        > > var x,y,z;
        > >
        > > versus
        > >
        > > var x;
        > > var y;
        > > var z;
        > >
        > > My opinion is yes, because it makes the script smaller and also
        > could help
        > > reinforce the fact that the var keyword is only at function scope.
        >
        > Thanks, I get it now. I think it is a good suggestion.
        >


        The new 'onevar' option can now be used to that
      Your message has been successfully submitted and would be delivered to recipients shortly.