Important Notice:

The do-while Loop

The do-while Loop

21 views 1 min read

The do-while Loop (डू-व्हाइल लूप)

हिंदी व्याख्या: do-while loop कम से कम एक बार जरूर चलता है क्योंकि condition बाद में चेक की जाती है।

English Explanation: The do-while loop executes the code at least once because the condition is checked after the code block.

Syntax:

do { // code } while (condition);

 

उदाहरण:

let i = 1;
do {
   console.log("Number:", i);
   i++;
}
   while (i <= 5);
Output:-
Number: 1 Number: 2 Number: 3 Number: 4 Number: 5

 

Related Notes