Write a script that outputs XHTML to display the given patterns separately, one below the other. Use for statements to generate the patterns. All asterisks (*) should be printed by a single statement of the form document.write( "*" ); (this causes the asterisks to print side by side). A statement of the form document.writeln( "
" ); can be used to position to the next line. A statement of the form document.write( " " ); can be used to display a space (needed for the last two patterns). There should be no other output statements in the program. [Hint: The last two patterns require that each line begin with an appropriate number of blanks. You may need to use the XHTML

 tags.]
1.

*
**
***
****
*****
******
*******
********
*********
**********

2.
**********
*********
********
*******
******
*****
****
***
**
*


<?xml version = "1.0" encoding = "utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title> Seeing Stars </title>
<script type = "text/javascript">
<!--
nextRow1: // target label of continue statement
for ( var row = 1; row <= 10; ++row )
{
document.writeln( "<br />" );
for ( var column = 1; column <= 10; ++column )
{
if ( column > row )
continue nextRow1; // next iteration of
// labeled loop
document.write( "* " );
}
}
document.writeln( "<br />" );
nextRow:
for ( var row = 1; row <= 10; ++row )
{
document.writeln( "<br />" );
for ( var column = 10; column >= 1; column-- )
{
if ( column < row )
continue nextRow; // next iteration of
// labeled loop
document.write( "* " );
}
}
nextRow2:
for ( var row = 1; row <= 10; ++row )
{
document.writeln( "<br />" );
for(var space=0; space<10; space++)
{
document.write("&nbsp;");
}
for ( var column = 10; column >= 1; column-- )
{
if ( column < row )
continue nextRow2; // next iteration of
// labeled loop
document.write( "*" );
}
}
// -->
</script>
</head>
<body>
<h1><center>Seeing Stars </center>
<hr />
<p> Click Refresh(F5) or reload to run this script again</p>
</body>
</html>