how length works in javascript for loop code example
Example 1: javascript loop through array
const array1 = ['a', 'b', 'c'];
array1.forEach(element => console.log(element));
Example 2: for next loop javasxcrop
for (i = 0; i < 5; i++) {}
const array1 = ['a', 'b', 'c'];
array1.forEach(element => console.log(element));
for (i = 0; i < 5; i++) {}