Over the years, I’ve seen a lot of confusion about JavaScript function invocation. In particular, a lot of people have complained that the semantics of this in function invocations is confusing. In my opinion, a lot of this confusion is cleared up by understanding the core function invocation primitive, and

  • bennyp@kbin.social
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    this is very handy when you want to carry over some shared context. Justin Fagnani described this as an implicit first argument, which is a model that helped me understand how to use it better.

    • uniqueid198x@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Cool. As mentioned, I have been in a different tech for a while now, and this article is from 2011, so I was interested if people do still use it