for each condition in js code example
Example 1: javascript for loop
for (var i; i < 10; i++) {
}
Example 2: loop an array in javascript
let array = ["loop", "this", "array"]; // input array variable
for (let i = 0; i < array.length; i++) { // iteration over input
console.log(array[i]); // logs the elements from the current input
}