JavaScript Example (Program)
Learn Details

Q. What is the follow step of Do While Loop ?

while do loop को create करने के लिए 3 step को follow करना पड़ता है

  • सबसे पहले initialize
  • उसके बाद increment / decrement
  • उसके बाद condition check

Syntax :

initialization value

do{

            //your Statement(s);

             increment/decrement

}

while(check condition)

Example :

<script>

var a = 1;

do{

            document.write("Hello Teach Coders <br>")

            a++;

}

while(a<=10);

</script>

Out Put :

Hello Teach Coders
Hello Teach Coders
Hello Teach Coders
Hello Teach Coders
Hello Teach Coders
Hello Teach Coders
Hello Teach Coders
Hello Teach Coders
Hello Teach Coders
Hello Teach Coders