🎯 Learning Objectives

By the end of this lecture, students will be able to:

🟨 1. forEach() — Loop Over an Array

✔ What it does

Executes a function for each item in the array.

✔ Does it return a new array?

❌ No, it always returns undefined.

✔ Does it change the original array?

❌ No, unless you manually modify items.

Example:

let fruits = ["Apple", "Mango", "Banana"];

fruits.forEach((fruit, index) => {
  console.log(index, fruit);
});