5.9 Do While

Hello everyone, in the previous video we talked about loop "while" And in this video, we will see what loop of "do while" So you ready? It’s gone! So, what is a do while loop? A "do while" loop or a repeat is the one that repeats until an expression becomes false.It is very similar to the "as long as" loop so the while loop.The condition is placed at the end of the corresponding code block. And this way the code block will always be executed at least once. Now let’s do the same example we did with the "while" and "for" loop. So we’ll write do and then we’ll display "count. value est" + count and count ++ And then at the end we will put exactly as we did with the "while" loop. while between parentheses count is different from 6 Before, to execute the code We will initialize our variable count here. then display a message to separate it from the other loops and then execute the code. And as you can see, it’s exactly the same as the other loops. as with the while and for loop Initialization is an expression that initializes the loop. The ending is an expression that is evaluated before each loop execution. And finally, an increment is an expression that is evaluated each time an iteration is performed.That was all for the loops. I’ll see you next time!