
|
Do..while is similar to while keyword, but it will run the code block before checking the condition. Remember to put a semicolon after the while statement.
Syntax:
do
{
// run code
}
while (condition);
Example:
do
{
i = i + 1;
}
while (i < var2);