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

Re: [jslint] Re: Problems with immediately invoked function expressions

Expand Messages
  • Jim Auldridge
    Groooan, I m so sorry for wasting your time. I needed the semicolon after the returned anon-function--I was looking below. Thanks for cluing me into JSLints
    Message 1 of 6 , Jan 26, 2011
    • 0 Attachment
      Groooan, I'm so sorry for wasting your time. I needed the semicolon after
      the returned anon-function--I was looking below.

      Thanks for cluing me into JSLints already clear clue *roll eyes at self*

      Jim

      On Wed, Jan 26, 2011 at 1:58 PM, Douglas Crockford <douglas@...>wrote:

      >
      >
      >
      > --- In jslint_com@yahoogroups.com <jslint_com%40yahoogroups.com>, Jim
      > Auldridge <auldridgej@...> wrote:
      > >
      > > Can anyone tell me why the code in this paste:
      > > http://pastie.textmate.org/private/gd8xrctmenh3qu2jrxintq
      > > generates these errors:
      > >
      > > Problem at line 7 character 1: Expected ';' and instead saw '}'.
      > >
      > > }() );
      >
      > Did you try to insert the missing semicolon where JSLint recommended?
      >
      >
      >



      --
      Jim Auldridge
      11012 Lincoln Ave
      Hagerstown MD 21740
      240.520.0240 (m)
      auldridgej@...
      http://jaaulde.com


      [Non-text portions of this message have been removed]
    • abyssoft@ymail.com
      Return statements should terminate in a ; var foo = ( function() { return function() { window.alert( bar ); };
      Message 2 of 6 , Jan 26, 2011
      • 0 Attachment
        Return statements should terminate in a ;

        var foo = ( function()
        {
        return function()
        {
        window.alert( 'bar' );
        }; <---
        }() );

        --- In jslint_com@yahoogroups.com, Jim Auldridge <auldridgej@...> wrote:
        >
        > Can anyone tell me why the code in this paste:
        > http://pastie.textmate.org/private/gd8xrctmenh3qu2jrxintq
        > generates these errors:
        >
        > Problem at line 7 character 1: Expected ';' and instead saw '}'.
        >
        > }() );
        >
        > Problem at line 7 character 2: Unreachable '(' after 'return'.
        >
        > }() );
        >
        > Problem at line 7 character 3: Expected an identifier and instead saw ')'.
        >
        > }() );
        >
        > Problem at line 7 character 3: Stopping, unable to continue. (100% scanned).
        >
        >
        >
        > Thanks,
        > Jim
        >
        > --
        > Jim Auldridge
        > 11012 Lincoln Ave
        > Hagerstown MD 21740
        > 240.520.0240 (m)
        > auldridgej@...
        > http://jaaulde.com
        >
        >
        > [Non-text portions of this message have been removed]
        >
      • Jim Auldridge
        Indeed, I am a bonehead. Thanks! ... -- Jim Auldridge 11012 Lincoln Ave Hagerstown MD 21740 240.520.0240 (m) auldridgej@gmail.com http://jaaulde.com [Non-text
        Message 3 of 6 , Jan 26, 2011
        • 0 Attachment
          Indeed, I am a bonehead. Thanks!

          On Wed, Jan 26, 2011 at 2:18 PM, abyssoft@... <abyssoft@...>wrote:

          >
          >
          >
          >
          > Return statements should terminate in a ;
          >
          > var foo = ( function()
          > {
          > return function()
          > {
          > window.alert( 'bar' );
          > }; <---
          > }() );
          >
          >
          > --- In jslint_com@yahoogroups.com <jslint_com%40yahoogroups.com>, Jim
          > Auldridge <auldridgej@...> wrote:
          > >
          > > Can anyone tell me why the code in this paste:
          > > http://pastie.textmate.org/private/gd8xrctmenh3qu2jrxintq
          > > generates these errors:
          > >
          > > Problem at line 7 character 1: Expected ';' and instead saw '}'.
          > >
          > > }() );
          > >
          > > Problem at line 7 character 2: Unreachable '(' after 'return'.
          > >
          > > }() );
          > >
          > > Problem at line 7 character 3: Expected an identifier and instead saw
          > ')'.
          > >
          > > }() );
          > >
          > > Problem at line 7 character 3: Stopping, unable to continue. (100%
          > scanned).
          > >
          > >
          > >
          > > Thanks,
          > > Jim
          > >
          > > --
          > > Jim Auldridge
          > > 11012 Lincoln Ave
          > > Hagerstown MD 21740
          > > 240.520.0240 (m)
          > > auldridgej@...
          > > http://jaaulde.com
          > >
          > >
          > > [Non-text portions of this message have been removed]
          > >
          >
          >
          >



          --
          Jim Auldridge
          11012 Lincoln Ave
          Hagerstown MD 21740
          240.520.0240 (m)
          auldridgej@...
          http://jaaulde.com


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