• Demdaru@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    10 hours 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
      1
      ·
      6 hours ago

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

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