English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

Write a Java Script program using while statement to display 10 numbers. - Computer Applications

Advertisements
Advertisements

Question

Write a Java Script program using while statement to display 10 numbers.

Long Answer

Solution

<html>
<Head>
<Title> Display 10 Numbers in Javascript</Title>
</Head>
<Body>
    <script language = “java script” type = “text / java script”>
    document.write (“<h2> using while statement </h2>”)
    Var no2= 0;
    while (no2<=10)
    {
    document.write (no2+ “ ”);
    no2=no2+1;
    }
   </script>
</body>
</html>
shaalaa.com
Looping / Repetitive
  Is there an error in this question or solution?
Chapter 15: Control Structure in Javascript - Evaluation [Page 330]

APPEARS IN

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

Englishहिंदीमराठी


      Forgot password?
Use app×