Page 150 - Computer Software Application TP - Volume 1
P. 150

COMPUTER SOFTWARE APPLICATION - CITS




           TASK 6 : Using for loop
           1  Open the text editor
           2  Write the following codes
              <html >

              <head>
              <title> For loop </title>
              </head>
              <body>

              <script>
              for (let i = 1; i <= 10; i++)
              {
              console.log(i);
              }

              </script>
              </body>
              </html>
           3  Save the program as a .html file

           4  Open the html file with a web browser
           5  Go to the browsers console tab and verify the output.























           TASK 7 : Using for loop and Iterating with conditions
           1  Open the text editor
           2  Write the following codes

              <html >
              <head>
              <title> . For loop Iterating with conditions </title>
              </head>
              <body>







                                                           135
 CITS : IT & ITES - Computer Software Application - Exercise 39  CITS : IT & ITES - Computer Software Application - Exercise 39
   145   146   147   148   149   150   151   152   153   154   155