Explain do while loop
Answers
Do while loop is an another kind of loop and different from "for loop" and "while loop". This loop will execute the statement at least once, even if the condition is false.
The condition will be checked after the loop has been executed. The loop will continue to execute or will terminate according to on the condition.
var i =1;
do
{
alert (i);
i = i + 1;
}
while (i < 10)
//At this point the value of i is 10
Answer:
Do while loop is an exit controlled loop which brings the execution of the program in the loop atleast once even if the condition is false.
The block of statements in the loop will be executed atleast once irrespective of its satisfying the condition.
The syntax of do while loop is:
do{
block of statements
}while(condition)
If this answer is helpful, please mark it the brainliest:)
Explanation: