• Demdaru@lemmy.world
    link
    fedilink
    arrow-up
    5
    arrow-down
    1
    ·
    3 days ago

    Not much experience, but quickly learned .bind() in JS after it switched me to window instead of object.

    • bleistift2@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      2
      ·
      3 days ago

      The key is to not reassign function names to local variables.

      const print = obj.toString
      print() // gives you a bad time