Advertisement
RokiAdhytama

Continue Label Test - Chapter 9

Jul 2nd, 2022
917
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 0.69 KB | None
  1. <html xmlns = "http://www.w3.org/1999/xhtml">
  2.    <head>
  3.       <title>Using the continue Statement with a Label</title>
  4.  
  5.       <script type = "text/javascript">
  6.          <!--
  7.          nextRow:   // target label of continue statement
  8.             for ( var row = 1; row <= 5; ++row ) {
  9.                document.writeln( "<br />" );
  10.  
  11.                for ( var column = 1; column <= 10; ++column ) {
  12.  
  13.                   if ( column > row )
  14.                      continue nextRow; // next iteration of
  15.                                        // labeled loop
  16.    
  17.                   document.write( "* " );
  18.                }
  19.             }
  20.          // -->
  21.       </script>
  22.  
  23.    </head><body></body>
  24. </html>
Advertisement
RAW Paste Data Copied
Advertisement