Similar to the while loop, a do-while loop executes code at least once, regardless of whether the condition is true or false.
It is useful when you need to run at least once a particular block of code, such as when validating user input or initializing a loop counter.