Home / Javascript Tips Generated By ChatGPT / Iterating Over an Array with forEach in Javascript forEach executes a function for each array element. Source Code fruits.forEach(fruit => console.log(fruit));