table.js 325 B

12345678910111213141516171819
  1. // task-table
  2. let i;
  3. let j;
  4. const array = [i, j];
  5. let str = "<table>";
  6. for (i = 1; i <10; i++) {
  7. str += "<tr>";
  8. for (j = 1; j < 10; j++) {
  9. str += "<td style='width:70px'>" + i +"*"+j+"="+ i * j + "</td>";
  10. }
  11. str += "</tr>";
  12. }
  13. str +="</table>";
  14. document.body.insertAdjacentHTML("afterbegin", str);