A wife tells her programmer husband: “Go to the store and buy a gallon of milk. If they have eggs, get six.”

He comes back with six gallons of milk. When she asks why, he replies: “They had eggs".

    • dnick@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      1 day ago

      Right, it would be started basically exactly the opposite. Certainly not a statement followed by an if block.

      • ignirtoq@feddit.online
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 day ago

        The code block I wrote is a statement followed by an if. What I meant be “backwards” was the order of conditions, not that the statement came after the if. It’s exactly what you asked for.