for loop pushing numbers into an array

PHOTO EMBED

Fri Apr 21 2023 23:32:19 GMT+0000 (Coordinated Universal Time)

Saved by @thecowsays #javascript

const myNumbers = [];
for (let i = 1; i < 1001; i++) {
  myNumbers.push(i);
}
console.log(`The array now has ${myNumbers.length} numbers as elements.`);
content_copyCOPY