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

2208Re: [jslint] possible erroneous warning due to multi-line layout (UNCLASSIFIED)

Expand Messages
  • spence.randall@ymail.com
    May 12 11:44 AM
    • 0 Attachment
      > I do have one complaint/question. Why would you do this:
      >
      > var processTheForm;
      > processTheForm = function () {...
      >
      > Instead you could do this:
      > var processTheForm = function () {...
      >
      > These are identical to the interpreter. The only exception is if the function is an example of immediate invocation. Immediately invoked functions are the value and type they return instead of type object.
      >
      > Austin Cheney, CISSP
      > http://prettydiff.com/
      > Classification: UNCLASSIFIED
      >

      If the processTheForm function refers to itself (no idea based on the code supplied of course since they were empty), then you have to declare it first, otherwise you get a warning in JSLint 'processTheForm' has not been fully defined yet.

      -Randall
    • Show all 7 messages in this topic