1let array = ["loop", "this", "array"]; // input array variable
2for (let i = 0; i < array.length; i++) { // iteration over input
3 console.log(array[i]); // logs the elements from the current input
4}
1var myArray = [];
2for (var i = 1; i <= 5; i++){
3 myArray.push(i);
4}
5console.log(myArray) // console output [ 1, 2, 3, 4, 5 ]