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

Re: Yet Another Global Question...

Expand Messages
  • santini.alberto
    ... For sure I have been missing something... :) I thought a global function was evil, but I see the misunderstanding. If I lint (JSLINT) the code function
    Message 1 of 6 , Nov 20, 2008
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...>
      wrote:
      >
      > I do not understand the benefit of this warning.
      >

      For sure I have been missing something... :)
      I thought a global function was evil, but I see the misunderstanding.

      If I lint (JSLINT) the code "function foo() {}", I have no error or
      warning.

      Then, if I get the report (JSLINT.report), I see foo function reported
      correctly as global.

      Maybe it would be usefull to add an option (noglobal) to get a warning
      in that case.

      Or, finally, getting always the report. :)

      Regards,
      Alberto
    Your message has been successfully submitted and would be delivered to recipients shortly.