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

Re: [jslint] Global variables

Expand Messages
  • pauanyu
    ... Personally, I will hardly notice any difference. Right now it s recommended to write your global variables like this: use strict ; /*global MY_GLOBAL */
    Message 1 of 3 , May 28, 2009
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, Michael Lorton <mlorton@...> wrote:
      >
      > Woot!
      >
      > I think.
      >
      > The inconvenience of declaring globals in every file might drive developers to use proper namespaces. Or it might just suck.
      >

      Personally, I will hardly notice any difference. Right now it's recommended to write your global variables like this:

      "use strict";
      /*global MY_GLOBAL */
      MY_GLOBAL = MY_GLOBAL || {};

      You'll note that the current way is actually more verbose than the new way.
    Your message has been successfully submitted and would be delivered to recipients shortly.