Exercise 5.6
This commit is contained in:
parent
2d93730c0b
commit
3be0773888
12
Chapter 5/Exercise 5.6
Normal file
12
Chapter 5/Exercise 5.6
Normal 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);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user