- keeps the scope of the loop clean to the block of forEach's scope.
- allows you to do something with each value in the array.
- re-use rhe array's values within the forEach loop without changing the original array.
- use fetch to make an async request to APIs
- the forEach() method does not wait for the async request (each promise) to resolve before moving on to the next task.
- the loop finishes iterating before the async request is resolved ( promise takes a while to resolve )
- an error is thrown if the async request fails.
- use a traditional for loop to iterate over the array.
- the for loop will wait for the async request to resolve before moving on to the next task.
- index is explicitly passed into the callback function.