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

2554Re: [jslint] Re: Formatting question

Expand Messages
  • Mark Volkmann
    Aug 4, 2011
    • 0 Attachment
      Keep in mind this option:

      var elementInWebPage, i, j;

      elementInWebPage = YAHOO.util.Dom.get('someElementID');

      I like to declare all the local variables at the beginning of each function
      in alphabetical order and then initialize them on separate lines.
      The only time I initialized them in the var statement is when they have
      short values like 1, [], or {}.

      R. Mark Volkmann
      Object Computing, Inc.

      [Non-text portions of this message have been removed]
    • Show all 16 messages in this topic