English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

Differentiate between while and do while statements. - Computer Applications

Advertisements
Advertisements

Question

Differentiate between while and do while statements.

Distinguish Between

Solution

  • While:
  1. In Java Script while loop is most basic loop.
  2. 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.
  3. While loop is false not a single statement inside the loop is executed.
  • Do…while:
  1. The do…..while loop is like a while loop.
  2. The Body of the loop always executed at least once before the condition can be executed.
  3. Do while loop is false then also the body of the loop is executed.
shaalaa.com
Looping / Repetitive
  Is there an error in this question or solution?
Chapter 15: Control Structure in Javascript - Evaluation [Page 329]

APPEARS IN

Samacheer Kalvi Computer Applications [English] Class 11 TN Board
Chapter 15 Control Structure in Javascript
Evaluation | Q 4. | Page 329
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×