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

Re: "Use a named function" error

Expand Messages
  • Jordan
    Works perfectly, thanks!
    Message 1 of 3 , Jul 6, 2011
    • 0 Attachment
      Works perfectly, thanks!

      --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...> wrote:
      >
      > --- In jslint_com@yahoogroups.com, "Jordan" <ljharb@> wrote:
      >
      > > var somefunc = function () {
      > > ....var self = {
      > > ........method: function () {
      > > ............// do something
      > > ............return self; // for chaining
      > > ........}
      > > ....};
      > > ....return self;
      > > },
      > > somefunc().method().method();
      > > --------------
      > > I get the error "Problem at line 7 character 20: Use a named function self."
      > >
      > > When I remove the `somefunc` code, and just declare the `self` object, the error does not occur.
      >
      > Thanks. Please try it now.
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.