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

538Re: Undefined variable

Expand Messages
  • benxwhite
    May 28, 2009
    • 0 Attachment
      you might try something like this...

      var Testvar = window.Testvar || {};

      --- In jslint_com@yahoogroups.com, Nagy Endre <forewer2000@...> wrote:
      >
      > I'm trying to check if a variable is already defined and define if is not.
      >
      > If (Testvar === undefined) {
      > � var Testvar = {};
      > }
      >
      > JsLint say that Testvar was used before was defined.
      > How can I check this in the right way?
      >
      >
      >
      >
      >
      >
      > [Non-text portions of this message have been removed]
      >
    • Show all 25 messages in this topic