hw10_10_cubes.html 267 B

12345678910111213
  1. <head>cubes</head><br><br>
  2. <body>
  3. <script>
  4. let n = +prompt("Enter N (Length)");
  5. const arr = [];
  6. for (let i = 0; i < n; i++) {
  7. arr[i] = i ** 3;
  8. //console.log(arr);
  9. }
  10. alert(arr);
  11. </script>
  12. </body>