New course! Every coder should learn Generative AI!
Try a free lesson+ 2
How to use the D0....While Loop??
could you give me a practicle example of how to use the D0....While Loop in JS??
2 Answers
+ 5
Do while loop is generally used when we want the loop to execute at least once.
You do this in the programmes which once executed asked user wether to restart it or not by putting the entire program in a do..while loop.
+ 3
var x = 10;
do {
console.log(x--);
} while(x>0);