FWGX Lemmy
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
@devilish666@lemmy.world to Programmer Humor@programming.dev • 1 year ago

I need this....

lemmy.world

message-square
34
fedilink
368

I need this....

lemmy.world

@devilish666@lemmy.world to Programmer Humor@programming.dev • 1 year ago
message-square
34
fedilink
  • @gandalf_der_12te@feddit.de
    link
    fedilink
    14•1 year ago
    function is_equal (x, y) {
      if (x == y)
          print("x is equal to y")
          return true;
      return false;
    }
    
    • @MTK@lemmy.world
      cake
      link
      fedilink
      1•
      edit-2
      1 year 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@lemmy.world
        link
        fedilink
        1•1 year ago
        function is_equal (x ,y) {
            if (Math.Random() > 0.38) {
                console.log(x + " is equal to " + y)
                return true
            }
            
            return false
        }
        
    • @KairuByte@lemmy.dbzer0.com
      link
      fedilink
      1•
      edit-2
      1 year ago

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

      • Ziglin (it/they)
        link
        fedilink
        1•1 year ago

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

        • @KairuByte@lemmy.dbzer0.com
          link
          fedilink
          1•1 year ago

          Mmm I don’t think this could be JavaScript. Unless we are always returning true.

Programmer Humor@programming.dev

!programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
  • 1.62K users / day
  • 3.85K users / week
  • 9.63K users / month
  • 19.9K users / 6 months
  • 24.7K subscribers
  • 1.54K Posts
  • 55.5K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne
  • BE: 0.19.3
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org