• xmunk@sh.itjust.works
    link
    fedilink
    arrow-up
    15
    arrow-down
    3
    ·
    7 months ago
    ==
    

    Well there’s your problem, you’re using an operator that shouldn’t exist. Triple equals all the things and if you want to coerce types write it out explicitly.

    • mogoh@lemmy.ml
      link
      fedilink
      arrow-up
      16
      ·
      7 months ago

      While you are basically right, the problem is that there is an operator that should not exist. Though that is not the biggest problem of JavaScript.

      • deadbeef79000@lemmy.nz
        link
        fedilink
        arrow-up
        3
        ·
        7 months ago

        Surprise Type coercion is our greatest weapon!

        What about the limitless coffers of Rome implicit global scope?

        Well then, surprise type coercion and the limitless coffers of Rome implicit global scope are our greatest weapons.