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

Re: white space algorithm error

Expand Messages
  • Douglas Crockford
    ... I does not pass when I try it.
    Message 1 of 3 , Jun 30, 2011
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "Cheney, Edward A SSG RES USAR USARC" <austin.cheney@...> wrote:
      >
      > The following code passes the JSLint white space rule:
      >
      > var a = function () {
      > ...."use strict";
      > ....var b = function () {
      > ............var c;
      > ....},
      > ........c;
      > };

      I does not pass when I try it.
    • sandyhead25
      Sorry, Update to erroneous, but passing pattern: var a = function () { .... use strict ; ....var b = function () { ........var d; ....}, ........c; }; Pattern
      Message 2 of 3 , Jul 1, 2011
      • 0 Attachment
        Sorry,

        Update to erroneous, but passing pattern:

        var a = function () {
        ...."use strict";
        ....var b = function () {
        ........var d;
        ....},
        ........c;
        };

        Pattern has two corrections:
        1) Duplicate variable name removed
        2) The third var keyword has a reduced indentation

        In my opinion this is the correct pattern:

        var a = function () {
        ...."use strict";
        ....var b = function () {
        ............var d;
        ........},
        ........c;
        };


        Austin Cheney, CISSP
        http://prettydiff.com/
      Your message has been successfully submitted and would be delivered to recipients shortly.