Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html xmlns = "http://www.w3.org/1999/xhtml">
- <head>
- <title>Using the break Statement with a Label</title>
- <script type = "text/javascript">
- <!--
- stop: { // labeled block
- for ( var row = 1; row <= 10; ++row ) {
- for ( var column = 1; column <= 5 ; ++column ) {
- if ( row == 5 )
- break stop; // jump to end of stop block
- document.write( "* " );
- }
- document.writeln( "<br />" );
- }
- // the following line is skipped
- document.writeln( "This line should not print" );
- }
- document.writeln( "End of script" );
- // -->
- </script>
- </head><body></body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement