Advertisements
Advertisements
प्रश्न
Differentiate between while and do while statements.
अंतर स्पष्ट करें
उत्तर
- While:
- In Java Script while loop is most basic loop.
- First condition will be evaluated and then only based on the result of the condition the body of the loop will be executed or not.
- While loop is false not a single statement inside the loop is executed.
- Do…while:
- The do…..while loop is like a while loop.
- The Body of the loop always executed at least once before the condition can be executed.
- Do while loop is false then also the body of the loop is executed.
shaalaa.com
Looping / Repetitive
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
APPEARS IN
संबंधित प्रश्न
Which of the following is not a looping statement?
Which part of the loop statement determines the number of times, the loop will be iterated?
In the _____ loop, body of the loop always executed at least once before the condition can be executed.
What is called a loop and what are its types?
Explain for loop with example.
Write a Java Script program using while statement to display 10 numbers.