const myArray = []; for (let x = 0; x < 10; x++) { myArray.push(x + 1); } console.log(myArray); for (let val of myArray) { console.log(val); }