Nested Loop

The <div> tag is empty until the end of <script> where theString gets inserted into myTable. Tags & data for the table rows & columns get appended to theString at every “+=”. The table data <td> is nothing more than the product of the two factors x and y, the column and row indexes respectively.
