Exercise 5.6

This commit is contained in:
Karan 2021-11-24 19:39:19 +05:30 committed by GitHub
parent 2d93730c0b
commit 3be0773888
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

12
Chapter 5/Exercise 5.6 Normal file
View File

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