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

It is not necessary to initialize 'foo' to 'undefined'.

Expand Messages
  • walfisch_in_the_sea
    Hi, I have a queer error message in my code. //My full code: use strict ; var foo = true; //The error message: Error: Problem at line 2 character 9: It is not
    Message 1 of 3 , Jan 12, 2010
    • 0 Attachment
      Hi,
      I have a queer error message in my code.

      //My full code:
      "use strict";
      var foo = true;



      //The error message:
      Error:

      Problem at line 2 character 9: It is not necessary to initialize 'foo' to 'undefined'.

      var foo = true;
    • Harry Whitfield
      ... This also occurs with a single line such as; var foo = 2.3; which gives: Error: Problem at line 1 character 9: It is not necessary to initialize foo to
      Message 2 of 3 , Jan 13, 2010
      • 0 Attachment
        On 13 Jan 2010, at 07:37:27, walfisch_in_the_sea wrote:

        > I have a queer error message in my code.
        >
        > //My full code:
        > "use strict";
        > var foo = true;
        >
        > //The error message:
        > Error:
        >
        > Problem at line 2 character 9: It is not necessary to initialize 'foo' to 'undefined'.
        >
        > var foo = true;

        This also occurs with a single line such as;

        var foo = 2.3;

        which gives:

        Error:
        Problem at line 1 character 9: It is not necessary to initialize 'foo' to 'undefined'.

        var foo = 2.3;

        Harry.
      • Douglas Crockford
        ... Sorry about that. Please try it now.
        Message 3 of 3 , Jan 13, 2010
        • 0 Attachment
          --- In jslint_com@yahoogroups.com, "walfisch_in_the_sea" <christian.wirkus@...> wrote:
          > //The error message:
          > Error:
          >
          > Problem at line 2 character 9: It is not necessary to initialize 'foo' to 'undefined'.
          >
          > var foo = true;


          Sorry about that. Please try it now.
        Your message has been successfully submitted and would be delivered to recipients shortly.