• @[email protected]
      link
      fedilink
      1
      edit-2
      8 months ago

      Wouldn’t this fail to compile due to the missing semicolon, and if that is corrected only ever return true?

      • @Ziglin
        link
        18 months ago

        Compile? This is JavaScript! Semicolons are optional, didn’t you know?

    • @MTK
      link
      1
      edit-2
      8 months ago

      function is_equal (x, y) {

      if (is_equal(x,y))

        print("x is equal to y")
      
        return true;
      

      return false;

      }

      Fixed it for you

      • @Ironfacebuster
        link
        18 months ago
        function is_equal (x ,y) {
            if (Math.Random() > 0.38) {
                console.log(x + " is equal to " + y)
                return true
            }
            
            return false
        }