Home / Javascript Tips Generated By ChatGPT / Iterating Over Arrays with for Loops in Javascript Use a for loop to iterate over each element in an array. Source Code let fruits = ['apple', 'banana', 'cherry']; for (let i = 0; i < fruits.length; i++) { console.log(fruits[i]); }