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

3013Re: [jslint] `this` in anonymous function without strict violation?

Expand Messages
  • Tom Worster
    Sep 19, 2012
    • 0 Attachment
      On 9/19/12 4:47 PM, "Felix E. Klee" <felix.klee@...> wrote:

      >On Fri, Sep 7, 2012 at 1:21 PM, Tom Worster <fsb@...> wrote:
      >> this is just JSLint saving you time in detecting an ES5 strict mode
      >> error
      >> see http://is.gd/WCXyRm
      >Thanks for the link. I now read the article, and I understand that
      >JSLint is just warning about a strict mode error. However, I do not
      >understand why "function f()" is treated differently than "var f =
      >function ()". Aren't the two statements equivalent? Or am I missing

      (i'm an incompetent but) i see it as analogous to the difference between:

      f =


      var f =

      i the latter, function f is clearly within the scope of the strict mode
      function it appears in. no danger using this in there.

      and if that's wrong then i'll just declare that it's a good enough
      metaphor for me:)
    • Show all 14 messages in this topic