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

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

Expand Messages
  • Felix E. Klee
    Sep 21, 2012
      On Fri, Sep 21, 2012 at 12:05 AM, Doc Emmett Splendid
      <emmett.thesane@...> wrote:
      > Sorry, that was a typo. I meant to say "there are other things you
      > cannot do with the function *statement*".

      To my knowledge, `function f` is just a shortcut for `var f = function`.
      I am unaware of any difference between both.

      > While neither form could be used in place, he decided that the
      > expression form was more likely to indicate the programmer intends to
      > call it with a context.

      That's how I understand the rationale as well. So, the code in question
      is not actually a strict mode violation.
    • Show all 14 messages in this topic