• @xmunk
    link
    103 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.

    • @[email protected]
      link
      fedilink
      153 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.

      • @[email protected]
        link
        fedilink
        33 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.

    • Zagorath
      link
      fedilink
      63 months ago

      == is acceptable for null checks. And basically nothing else.