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

Duplicate function declarations / var statements

Expand Messages
  • Erik Eckhardt
    JSLint does not give any warning about the following (repeating a var declaration in the global scope). var fn = function () { //something here }; var fn =
    Message 1 of 1 , Jul 25, 2011
    • 0 Attachment
      JSLint does not give any warning about the following (repeating a var
      declaration in the global scope).

      var fn = function () {
      //something here
      };

      var fn = function () {
      //something different here
      };

      Nor does it warn when repeating the same function declaration using the
      simple `function fn() {}` syntax.

      Do you think it should?


      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.