hw06_16.html 535 B

123456789101112131415161718192021222324
  1. <header>
  2. <h1>Multiply table rest</h1>
  3. </header>
  4. <body>
  5. <script>
  6. arr = [];
  7. for (let i = 1; i <= 5; i++) {
  8. arr[i] = [];
  9. for (let j = 1; j <= 5; j++) {
  10. arr[i][j] = i * j;
  11. }
  12. }
  13. const [, ...a] = arr;
  14. const [, ...aa0] = a[0];
  15. const [, ...aa1] = a[1];
  16. const [, ...aa2] = a[2];
  17. const [, ...aa3] = a[3];
  18. const [, ...aa4] = a[4];
  19. arr = [aa0, aa1, aa2, aa3, aa4];
  20. alert(arr);
  21. </script>
  22. </body>