• dill@lemmy.one
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    I am annoyed that I can’t think of an argument for this. I don’t want to believe it

    • intensely_human@lemm.ee
      link
      fedilink
      arrow-up
      1
      arrow-down
      3
      ·
      edit-2
      1 year ago

      Whereas many languages make functions first class citizens, via the use of this javascript turns execution contexts into first class citizens as well.

      You can build up an object of key value pairs and then proceed as if those were named variables in the code.

      Obviously it has its pros and cons, but it’s a powerful tool.