Advertisement
RokiAdhytama

Do While Test - Chapter 9

Jul 2nd, 2022
923
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 0.53 KB | None
  1. <html xmlns = "http://www.w3.org/1999/xhtml">
  2.    <head>
  3.       <title>Using the do...while Repetition Statement</title>
  4.  
  5.       <script type = "text/javascript">
  6.          <!--
  7.          var counter = 1;
  8.    
  9.          do {    
  10.             document.writeln( "<h" + counter + ">This is " +
  11.                "an h" + counter + " level head" + "</h" +  
  12.                counter + ">" );
  13.                              
  14.             ++counter;
  15.          } while ( counter <= 6 );
  16.          // -->
  17.       </script>
  18.  
  19.    </head><body></body>
  20. </html>
Advertisement
RAW Paste Data Copied
Advertisement