• glibg10b@lemmy.ml
    link
    fedilink
    arrow-up
    27
    arrow-down
    3
    ·
    1 year ago

    Well, it’s wrong. The only difference between the two kinds of loops is that do-while starts by unconditionally running the body once

    • KTVX94@lemmy.myserv.one
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      Yes, that’s true. It’s also good enough to make an abstract concept more approachable while getting a kick out of it too. Honestly this is more of a “well akcshually” thing that someone who already knows how this works would point out (nobody has so far) than something that misleads students who don’t get it. It works.