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

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

    • @[email protected]
      link
      fedilink
      1
      edit-2
      4 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

      • @[email protected]
        link
        fedilink
        14 months ago
        function is_equal (x ,y) {
            if (Math.Random() > 0.38) {
                console.log(x + " is equal to " + y)
                return true
            }
            
            return false
        }