Skip to main content
added 86 characters in body
Source Link
msigman
  • 4.5k
  • 3
  • 23
  • 32

This is untested psuedo-code, but may help you get started:

var x, row;
for(x=1;x<10;x=x+row)
{
    document.write('<tr>');
    for(row=0;row<2;row++)
    {
        document.write('<td>' + (x + row));
        // Whatever else you want to output
    }
}

Edit: this answer was given before OP edited his question to add additional info.

This is untested psuedo-code, but may help you get started:

var x, row;
for(x=1;x<10;x=x+row)
{
    document.write('<tr>');
    for(row=0;row<2;row++)
    {
        document.write('<td>' + (x + row));
        // Whatever else you want to output
    }
}

This is untested psuedo-code, but may help you get started:

var x, row;
for(x=1;x<10;x=x+row)
{
    document.write('<tr>');
    for(row=0;row<2;row++)
    {
        document.write('<td>' + (x + row));
        // Whatever else you want to output
    }
}

Edit: this answer was given before OP edited his question to add additional info.

Post Undeleted by msigman
Post Deleted by msigman
Source Link
msigman
  • 4.5k
  • 3
  • 23
  • 32

This is untested psuedo-code, but may help you get started:

var x, row;
for(x=1;x<10;x=x+row)
{
    document.write('<tr>');
    for(row=0;row<2;row++)
    {
        document.write('<td>' + (x + row));
        // Whatever else you want to output
    }
}