Which control structure in Go is used to execute a block of code repeatedly based on a condition, but at least once, even if the condition is false initially?

  • do-while
  • for
  • if
  • while
The do-while loop in Go is used to execute a block of code repeatedly based on a condition, but it ensures that the block of code is executed at least once, even if the condition is false initially.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *