"… and if they have eggs, get a dozen, " she added.

He later came home with 12 gallons of milk.

“Why’d you get so much milk!?!” his wife asked.

He replies, “THEY HAD EGGS!”

  • unitedwithme@lemmy.today
    link
    fedilink
    arrow-up
    11
    ·
    12 hours ago

    So get a gallon of milk, and IF they have eggs, get a dozen (gallons of milk). Basically this is an if statement meaning if X is true, do this. Well normally we think get a dozen would be get 12 eggs, but because “have eggs = true” that meant get 12 gallons of milk. The opposite would’ve been eggs=false and he’d come home with 1 gallon.

    I’m not a Dev so I can’t write the code better, but I understand the language enough