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

Re: Unexpected '.'

Expand Messages
  • spence.randall@ymail.com
    Works as expected, thanks for the fast turnaround. -Randall
    Message 1 of 7 , Feb 14, 2012
    • 0 Attachment
      Works as expected, thanks for the fast turnaround.

      -Randall

      --- In jslint_com@yahoogroups.com, "douglascrockford" <douglas@...> wrote:
      >
      > --- In jslint_com@yahoogroups.com, "spence.randall@" <randall@> wrote:
      > >
      > >
      > > Given the following code:
      > >
      > > var obj = {},
      > > ````test = function () {
      > > ````````'use strict';
      > > ````````return true;
      > > ````}.bind(obj);
      > >
      > > JSLint returns the following error:
      > >
      > > Error:
      > >
      > > Problem at line 5 character 6: Unexpected '.'.
      > >
      > > }.bind(obj);
      > >
      > > Problem at line 5 character 6: Stopping. (62% scanned).
      >
      > Thanks. Please try it now.
      >
    • Jordan Harband
      The error does still occur if you do choose to wrap your function in parens. ... [Non-text portions of this message have been removed]
      Message 2 of 7 , Feb 17, 2012
      • 0 Attachment
        The error does still occur if you do choose to wrap your function in parens.

        On Feb 14, 2012, at 11:27 AM, douglascrockford wrote:

        > --- In jslint_com@yahoogroups.com, "spence.randall@..." <randall@...> wrote:
        > >
        > >
        > > Given the following code:
        > >
        > > var obj = {},
        > > ````test = function () {
        > > ````````'use strict';
        > > ````````return true;
        > > ````}.bind(obj);
        > >
        > > JSLint returns the following error:
        > >
        > > Error:
        > >
        > > Problem at line 5 character 6: Unexpected '.'.
        > >
        > > }.bind(obj);
        > >
        > > Problem at line 5 character 6: Stopping. (62% scanned).
        >
        > Thanks. Please try it now.
        >
        >



        [Non-text portions of this message have been removed]
      • douglascrockford
        ... That is because you shouldn t do that.
        Message 3 of 7 , Feb 18, 2012
        • 0 Attachment
          --- In jslint_com@yahoogroups.com, Jordan Harband <ljharb@...> wrote:
          >
          > The error does still occur if you do choose to wrap your function in parens.


          That is because you shouldn't do that.
        • Jordan Harband
          Why do you recommend wrapping an immediate function invocation in parens, but not an immediate invocation of a function call on a prototype method of an
          Message 4 of 7 , Feb 19, 2012
          • 0 Attachment
            Why do you recommend wrapping an immediate function invocation in parens, but not an immediate invocation of a function call on a prototype method of an anonymous function?

            On Feb 18, 2012, at 5:46 AM, douglascrockford wrote:

            > --- In jslint_com@yahoogroups.com, Jordan Harband <ljharb@...> wrote:
            > >
            > > The error does still occur if you do choose to wrap your function in parens.
            >
            > That is because you shouldn't do that.
            >
            >



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