JavaScript Example (Program)
Learn Details

Q. What is the follow step of while loop ?

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

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

Syntax :

initialization value

while(condition){

            //your Statement(s);

}

Example :

<script>

var a = 1;

while(a<=11){

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

a++;

}

</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
Hello Teach Coders